Ignore:
Timestamp:
01/09/24 01:26:08 (11 months ago)
Author:
ppaunovski <paunovskipavel@…>
Branches:
master
Children:
e272096
Parents:
b101b69
Message:

All 3 main use cases implemented.

  1. Starting a commute
  2. Writing a ticket
  3. Starting an instance of a Bus Line
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  
    1717    @Id
    1818    @Column(name = "b_id")
    19     private Long bId;
     19    private Long BId;
     20
    2021    @Basic
    2122    @Column(name = "b_datum_na_kupuvanje")
    2223    private Timestamp bDatumNaKupuvanje;
     24
    2325    @Basic
    2426    @Column(name = "b_status", columnDefinition = "string_kratok")
    2527    @Enumerated(EnumType.STRING)
    2628    private BILET_STATUS bStatus;
     29
    2730    @ManyToOne
    2831    @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
    29     private Korisnik korisnikByPatnikKId;
     32    private Patnik korisnikByPatnikKId;
     33
    3034    @ManyToOne
    3135    @JoinColumn(name = "tb_id", referencedColumnName = "tb_id")
  • src/main/java/mk/ukim/finki/busngo/model/entities/Instancanalinija.java

    rb101b69 rbde8b13  
    2424    @ManyToOne
    2525    @JoinColumn(name = "vozac_k_id", referencedColumnName = "k_id", nullable = false)
    26     private Korisnik korisnikByVozacKId;
     26    private Vozac korisnikByVozacKId;
    2727    @ManyToOne
    2828    @JoinColumn(name = "a_registracija", referencedColumnName = "a_registracija")
  • src/main/java/mk/ukim/finki/busngo/model/entities/Kazna.java

    rb101b69 rbde8b13  
    99@Data
    1010@Entity
     11@Inheritance(strategy = InheritanceType.JOINED)
    1112public class Kazna {
    1213    @GeneratedValue(strategy = GenerationType.IDENTITY)
     
    1415    @Column(name = "kz_id")
    1516    private Long kzId;
     17
    1618    @Basic
    1719    @Column(name = "kz_iznos")
    1820    private Double kzIznos;
     21
    1922    @Basic
    2023    @Column(name = "kz_plateno")
    2124    private Boolean kzPlateno;
     25
    2226    @Basic
    2327    @Column(name = "kz_datum")
    2428    private Timestamp kzDatum;
     29
    2530    @Basic
    2631    @Column(name = "kz_datum_plateno")
    2732    private Timestamp kzDatumPlateno;
     33
    2834    @Basic
    2935    @Column(name = "kz_dokument")
    3036    private String kzDokument;
     37
    3138    @ManyToOne
    3239    @JoinColumn(name = "kondukter_k_id", referencedColumnName = "k_id")
    33     private Korisnik korisnikByKondukterKId;
     40    private Kondukter korisnikByKondukterKId;
     41
    3442    @ManyToOne
    3543    @JoinColumn(name = "kontrola_id", referencedColumnName = "kontrola_id")
    3644    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;
    4151}
  • src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaneregistriran.java

    rb101b69 rbde8b13  
    88@Data
    99@Entity
    10 public class Kaznazaneregistriran {
    11     @GeneratedValue(strategy = GenerationType.IDENTITY)
    12     @Id
    13     @Column(name = "kz_id")
    14     private Long kzId;
     10public class Kaznazaneregistriran extends Kazna {
    1511    @Basic
    1612    @Column(name = "kzn_telefon")
    1713    private String kznTelefon;
     14
    1815    @Basic
    1916    @Column(name = "kzn_ime")
    2017    private String kznIme;
     18
    2119    @Basic
    2220    @Column(name = "kzn_adresa")
    2321    private String kznAdresa;
    24     @OneToOne
    25     @JoinColumn(name = "kz_id", referencedColumnName = "kz_id", nullable = false)
    26     private Kazna kaznaByKzId;
    2722}
  • src/main/java/mk/ukim/finki/busngo/model/entities/Kaznazaregistriran.java

    rb101b69 rbde8b13  
    88@Data
    99@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;
     10public class Kaznazaregistriran extends Kazna{
    1811    @ManyToOne
    1912    @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
    20     private Korisnik korisnikByPatnikKId;
     13    private Patnik korisnikByPatnikKId;
    2114}
  • src/main/java/mk/ukim/finki/busngo/model/entities/Kondukter.java

    rb101b69 rbde8b13  
    44import lombok.Data;
    55
     6import java.util.List;
    67import java.util.Objects;
    78
    89@Data
    910@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;
     11public class Kondukter extends Vraboten{
     12    @OneToMany(mappedBy = "korisnikByKondukterKId")
     13    private List<Kazna> kaznasByKId;
     14    @OneToMany(mappedBy = "korisnikByKondukterKId")
     15    private List<Kontroli> kontrolisByKId;
    1816
    1917}
  • src/main/java/mk/ukim/finki/busngo/model/entities/Kontroli.java

    rb101b69 rbde8b13  
    2323    @ManyToOne
    2424    @JoinColumn(name = "kondukter_k_id", referencedColumnName = "k_id")
    25     private Korisnik korisnikByKondukterKId;
     25    private Kondukter korisnikByKondukterKId;
    2626    @ManyToOne
    2727    @JoinColumn(name = "inl_id", referencedColumnName = "inl_id")
  • src/main/java/mk/ukim/finki/busngo/model/entities/Korisnik.java

    rb101b69 rbde8b13  
    1515@Data
    1616@Entity
     17@Inheritance(strategy = InheritanceType.JOINED)
    1718public class Korisnik implements UserDetails {
    1819    @GeneratedValue(strategy = GenerationType.IDENTITY)
     
    2021    @Column(name = "k_id")
    2122    private Long kId;
     23
    2224    @Basic
    2325    @Column(name = "k_ime")
    2426    private String kIme;
     27
    2528    @Basic
    2629    @Column(name = "k_adresa")
    2730    private String kAdresa;
     31
    2832    @Basic
    2933    @Column(name = "k_telefon")
    3034    private String kTelefon;
     35
    3136    @Basic
    3237    @Column(name = "k_email")
    3338    private String kEmail;
     39
    3440    @Basic
    3541    @Column(name = "k_embg")
    3642    private String kEmbg;
     43
    3744    @Basic
    3845    @Column(name = "k_is_admin")
    3946    private Boolean kIsAdmin;
     47
    4048    @Basic
    4149    @Column(name = "k_lozinka")
    4250    private String kLozinka;
    43     @OneToMany(mappedBy = "korisnikByPatnikKId")
    44     private List<Bilet> biletsByKId;
     51
     52//    @OneToMany(mappedBy = "korisnikByPatnikKId")
     53//    private List<Bilet> biletsByKId;
    4554//    private boolean isAccountNonExpired = true;
    4655//    private boolean isAccountNonLocked = true;
  • src/main/java/mk/ukim/finki/busngo/model/entities/Patnik.java

    rb101b69 rbde8b13  
    44import lombok.Data;
    55
     6import java.util.List;
    67import java.util.Objects;
    78
    89@Data
    910@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;
     11public 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;
    1820}
  • src/main/java/mk/ukim/finki/busngo/model/entities/Tipbilet.java

    rb101b69 rbde8b13  
    1919    private Long tbTrajnost;
    2020    @Basic
     21    @Column(name = "tb_cena")
     22    private Float tbCena;
     23    @Basic
    2124    @Column(name = "tb_ime")
    2225    private String tbIme;
  • src/main/java/mk/ukim/finki/busngo/model/entities/Vozac.java

    rb101b69 rbde8b13  
    44import lombok.Data;
    55
     6import java.util.List;
    67import java.util.Objects;
    78
    89@Data
    910@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;
     11public class Vozac extends Vraboten {
     12    @OneToMany(mappedBy = "korisnikByVozacKId")
     13    private List<Instancanalinija> instancanalinijasByKId;
    1814
    1915}
  • src/main/java/mk/ukim/finki/busngo/model/entities/Vozenje.java

    rb101b69 rbde8b13  
    2727    @ManyToOne
    2828    @JoinColumn(name = "patnik_k_id", referencedColumnName = "k_id")
    29     private Korisnik korisnikByPatnikKId;
     29    private Patnik korisnikByPatnikKId;
    3030    @ManyToOne
    3131    @JoinColumn(name = "kacuva_pnl_id", referencedColumnName = "pnl_id", nullable = false)
  • src/main/java/mk/ukim/finki/busngo/model/entities/Vraboten.java

    rb101b69 rbde8b13  
    1010@Data
    1111@Entity
    12 public class Vraboten {
    13     @GeneratedValue(strategy = GenerationType.IDENTITY)
    14     @Id
    15     @Column(name = "k_id")
    16     private Long kId;
     12public class Vraboten extends Korisnik {
    1713    @Basic
    1814    @Column(name = "v_plata")
    1915    private Double vPlata;
     16
    2017    @Basic
    2118    @Column(name = "v_datum_na_vrabotuvanje")
    2219    private Date vDatumNaVrabotuvanje;
     20
    2321    @Basic
    2422    @Column(name = "v_datum_prekin_vrabotuvanje")
    2523    private Date vDatumPrekinVrabotuvanje;
    26     @OneToOne
    27     @JoinColumn(name = "k_id", referencedColumnName = "k_id", nullable = false)
    28     private Korisnik korisnikByKId;
    2924
    3025}
  • src/main/java/mk/ukim/finki/busngo/model/enums/Role.java

    rb101b69 rbde8b13  
    66public enum Role implements GrantedAuthority {
    77    ROLE_USER,
     8    ROLE_PASSENGER,
     9    ROLE_DRIVER,
     10    ROLE_CONDUCTOR,
    811    ROLE_ADMIN;
    912
Note: See TracChangeset for help on using the changeset viewer.