Changeset bde8b13 for src/main/java/mk/ukim/finki/busngo/model
- Timestamp:
- 01/09/24 01:26:08 (11 months ago)
- Branches:
- master
- Children:
- e272096
- Parents:
- b101b69
- Location:
- src/main/java/mk/ukim/finki/busngo/model
- Files:
-
- 8 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/mk/ukim/finki/busngo/model/entities/Bilet.java
rb101b69 rbde8b13 17 17 @Id 18 18 @Column(name = "b_id") 19 private Long bId; 19 private Long BId; 20 20 21 @Basic 21 22 @Column(name = "b_datum_na_kupuvanje") 22 23 private Timestamp bDatumNaKupuvanje; 24 23 25 @Basic 24 26 @Column(name = "b_status", columnDefinition = "string_kratok") 25 27 @Enumerated(EnumType.STRING) 26 28 private BILET_STATUS bStatus; 29 27 30 @ManyToOne 28 31 @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id") 29 private Korisnik korisnikByPatnikKId; 32 private Patnik korisnikByPatnikKId; 33 30 34 @ManyToOne 31 35 @JoinColumn(name = "tb_id", referencedColumnName = "tb_id") -
src/main/java/mk/ukim/finki/busngo/model/entities/Instancanalinija.java
rb101b69 rbde8b13 24 24 @ManyToOne 25 25 @JoinColumn(name = "vozac_k_id", referencedColumnName = "k_id", nullable = false) 26 private KorisnikkorisnikByVozacKId;26 private Vozac korisnikByVozacKId; 27 27 @ManyToOne 28 28 @JoinColumn(name = "a_registracija", referencedColumnName = "a_registracija") -
src/main/java/mk/ukim/finki/busngo/model/entities/Kazna.java
rb101b69 rbde8b13 9 9 @Data 10 10 @Entity 11 @Inheritance(strategy = InheritanceType.JOINED) 11 12 public class Kazna { 12 13 @GeneratedValue(strategy = GenerationType.IDENTITY) … … 14 15 @Column(name = "kz_id") 15 16 private Long kzId; 17 16 18 @Basic 17 19 @Column(name = "kz_iznos") 18 20 private Double kzIznos; 21 19 22 @Basic 20 23 @Column(name = "kz_plateno") 21 24 private Boolean kzPlateno; 25 22 26 @Basic 23 27 @Column(name = "kz_datum") 24 28 private Timestamp kzDatum; 29 25 30 @Basic 26 31 @Column(name = "kz_datum_plateno") 27 32 private Timestamp kzDatumPlateno; 33 28 34 @Basic 29 35 @Column(name = "kz_dokument") 30 36 private String kzDokument; 37 31 38 @ManyToOne 32 39 @JoinColumn(name = "kondukter_k_id", referencedColumnName = "k_id") 33 private Korisnik korisnikByKondukterKId; 40 private Kondukter korisnikByKondukterKId; 41 34 42 @ManyToOne 35 43 @JoinColumn(name = "kontrola_id", referencedColumnName = "kontrola_id") 36 44 private Kontroli kontroliByKontrolaId; 37 @OneToOne(mappedBy = "kaznaByKzId") 38 private Kaznazaneregistriran kaznazaneregistriranByKzId; 39 @OneToOne(mappedBy = "kaznaByKzId") 40 private Kaznazaregistriran kaznazaregistriranByKzId; 45 46 // @OneToOne(mappedBy = "kaznaByKzId") 47 // private Kaznazaneregistriran kaznazaneregistriranByKzId; 48 // 49 // @OneToOne(mappedBy = "kaznaByKzId") 50 // private Kaznazaregistriran kaznazaregistriranByKzId; 41 51 } -
src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaneregistriran.java
rb101b69 rbde8b13 8 8 @Data 9 9 @Entity 10 public class Kaznazaneregistriran { 11 @GeneratedValue(strategy = GenerationType.IDENTITY) 12 @Id 13 @Column(name = "kz_id") 14 private Long kzId; 10 public class Kaznazaneregistriran extends Kazna { 15 11 @Basic 16 12 @Column(name = "kzn_telefon") 17 13 private String kznTelefon; 14 18 15 @Basic 19 16 @Column(name = "kzn_ime") 20 17 private String kznIme; 18 21 19 @Basic 22 20 @Column(name = "kzn_adresa") 23 21 private String kznAdresa; 24 @OneToOne25 @JoinColumn(name = "kz_id", referencedColumnName = "kz_id", nullable = false)26 private Kazna kaznaByKzId;27 22 } -
src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaregistriran.java
rb101b69 rbde8b13 8 8 @Data 9 9 @Entity 10 public class Kaznazaregistriran { 11 @GeneratedValue(strategy = GenerationType.IDENTITY) 12 @Id 13 @Column(name = "kz_id") 14 private Long kzId; 15 @OneToOne 16 @JoinColumn(name = "kz_id", referencedColumnName = "kz_id", nullable = false) 17 private Kazna kaznaByKzId; 10 public class Kaznazaregistriran extends Kazna{ 18 11 @ManyToOne 19 12 @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id") 20 private Korisnik korisnikByPatnikKId;13 private Patnik korisnikByPatnikKId; 21 14 } -
src/main/java/mk/ukim/finki/busngo/model/entities/Kondukter.java
rb101b69 rbde8b13 4 4 import lombok.Data; 5 5 6 import java.util.List; 6 7 import java.util.Objects; 7 8 8 9 @Data 9 10 @Entity 10 public class Kondukter { 11 @GeneratedValue(strategy = GenerationType.IDENTITY) 12 @Id 13 @Column(name = "k_id") 14 private Long kId; 15 @OneToOne 16 @JoinColumn(name = "k_id", referencedColumnName = "k_id", nullable = false) 17 private Korisnik korisnikByKId; 11 public class Kondukter extends Vraboten{ 12 @OneToMany(mappedBy = "korisnikByKondukterKId") 13 private List<Kazna> kaznasByKId; 14 @OneToMany(mappedBy = "korisnikByKondukterKId") 15 private List<Kontroli> kontrolisByKId; 18 16 19 17 } -
src/main/java/mk/ukim/finki/busngo/model/entities/Kontroli.java
rb101b69 rbde8b13 23 23 @ManyToOne 24 24 @JoinColumn(name = "kondukter_k_id", referencedColumnName = "k_id") 25 private Ko risnikkorisnikByKondukterKId;25 private Kondukter korisnikByKondukterKId; 26 26 @ManyToOne 27 27 @JoinColumn(name = "inl_id", referencedColumnName = "inl_id") -
src/main/java/mk/ukim/finki/busngo/model/entities/Korisnik.java
rb101b69 rbde8b13 15 15 @Data 16 16 @Entity 17 @Inheritance(strategy = InheritanceType.JOINED) 17 18 public class Korisnik implements UserDetails { 18 19 @GeneratedValue(strategy = GenerationType.IDENTITY) … … 20 21 @Column(name = "k_id") 21 22 private Long kId; 23 22 24 @Basic 23 25 @Column(name = "k_ime") 24 26 private String kIme; 27 25 28 @Basic 26 29 @Column(name = "k_adresa") 27 30 private String kAdresa; 31 28 32 @Basic 29 33 @Column(name = "k_telefon") 30 34 private String kTelefon; 35 31 36 @Basic 32 37 @Column(name = "k_email") 33 38 private String kEmail; 39 34 40 @Basic 35 41 @Column(name = "k_embg") 36 42 private String kEmbg; 43 37 44 @Basic 38 45 @Column(name = "k_is_admin") 39 46 private Boolean kIsAdmin; 47 40 48 @Basic 41 49 @Column(name = "k_lozinka") 42 50 private String kLozinka; 43 @OneToMany(mappedBy = "korisnikByPatnikKId") 44 private List<Bilet> biletsByKId; 51 52 // @OneToMany(mappedBy = "korisnikByPatnikKId") 53 // private List<Bilet> biletsByKId; 45 54 // private boolean isAccountNonExpired = true; 46 55 // private boolean isAccountNonLocked = true; -
src/main/java/mk/ukim/finki/busngo/model/entities/Patnik.java
rb101b69 rbde8b13 4 4 import lombok.Data; 5 5 6 import java.util.List; 6 7 import java.util.Objects; 7 8 8 9 @Data 9 10 @Entity 10 public class Patnik { 11 @GeneratedValue(strategy = GenerationType.IDENTITY) 12 @Id 13 @Column(name = "k_id") 14 private Long kId; 15 @OneToOne 16 @JoinColumn(name = "k_id", referencedColumnName = "k_id", nullable = false) 17 private Korisnik korisnikByKId; 11 public class Patnik extends Korisnik { 12 @OneToMany(mappedBy = "korisnikByPatnikKId") 13 private List<Bilet> biletsByKId; 14 15 @OneToMany(mappedBy = "korisnikByPatnikKId") 16 private List<Kaznazaregistriran> kaznazaregistriransByKId; 17 18 @OneToMany(mappedBy = "korisnikByPatnikKId") 19 private List<Vozenje> vozenjesByKId; 18 20 } -
src/main/java/mk/ukim/finki/busngo/model/entities/Tipbilet.java
rb101b69 rbde8b13 19 19 private Long tbTrajnost; 20 20 @Basic 21 @Column(name = "tb_cena") 22 private Float tbCena; 23 @Basic 21 24 @Column(name = "tb_ime") 22 25 private String tbIme; -
src/main/java/mk/ukim/finki/busngo/model/entities/Vozac.java
rb101b69 rbde8b13 4 4 import lombok.Data; 5 5 6 import java.util.List; 6 7 import java.util.Objects; 7 8 8 9 @Data 9 10 @Entity 10 public class Vozac { 11 @GeneratedValue(strategy = GenerationType.IDENTITY) 12 @Id 13 @Column(name = "k_id") 14 private Long kId; 15 @OneToOne 16 @JoinColumn(name = "k_id", referencedColumnName = "k_id", nullable = false) 17 private Korisnik korisnikByKId; 11 public class Vozac extends Vraboten { 12 @OneToMany(mappedBy = "korisnikByVozacKId") 13 private List<Instancanalinija> instancanalinijasByKId; 18 14 19 15 } -
src/main/java/mk/ukim/finki/busngo/model/entities/Vozenje.java
rb101b69 rbde8b13 27 27 @ManyToOne 28 28 @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id") 29 private Korisnik korisnikByPatnikKId;29 private Patnik korisnikByPatnikKId; 30 30 @ManyToOne 31 31 @JoinColumn(name = "kacuva_pnl_id", referencedColumnName = "pnl_id", nullable = false) -
src/main/java/mk/ukim/finki/busngo/model/entities/Vraboten.java
rb101b69 rbde8b13 10 10 @Data 11 11 @Entity 12 public class Vraboten { 13 @GeneratedValue(strategy = GenerationType.IDENTITY) 14 @Id 15 @Column(name = "k_id") 16 private Long kId; 12 public class Vraboten extends Korisnik { 17 13 @Basic 18 14 @Column(name = "v_plata") 19 15 private Double vPlata; 16 20 17 @Basic 21 18 @Column(name = "v_datum_na_vrabotuvanje") 22 19 private Date vDatumNaVrabotuvanje; 20 23 21 @Basic 24 22 @Column(name = "v_datum_prekin_vrabotuvanje") 25 23 private Date vDatumPrekinVrabotuvanje; 26 @OneToOne27 @JoinColumn(name = "k_id", referencedColumnName = "k_id", nullable = false)28 private Korisnik korisnikByKId;29 24 30 25 } -
src/main/java/mk/ukim/finki/busngo/model/enums/Role.java
rb101b69 rbde8b13 6 6 public enum Role implements GrantedAuthority { 7 7 ROLE_USER, 8 ROLE_PASSENGER, 9 ROLE_DRIVER, 10 ROLE_CONDUCTOR, 8 11 ROLE_ADMIN; 9 12
Note:
See TracChangeset
for help on using the changeset viewer.