feat: update entity Passage, Visit

This commit is contained in:
Petr Rudichev 2025-02-19 10:53:36 +03:00
parent e436c54714
commit 5f5a5e2c0c
2 changed files with 4 additions and 3 deletions

View File

@ -27,6 +27,6 @@ public class Passage {
@Size(max = 100, message = "Максимальная длина названия 100 символов!")
private String passage;
@OneToMany(mappedBy = "typePassage")
@OneToMany(mappedBy = "passage")
private List<Visit> visits;
}

View File

@ -40,7 +40,8 @@ public class Visit {
@JoinColumn(name = "end_terminal_id", referencedColumnName = "code")
private Terminal endTerminal;
@OneToMany(mappedBy = "passage")
private long typePassage;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "type_passage", referencedColumnName = "id", nullable = false)
private Passage passage;
}