source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Organisation.java@ fdd7961

main
Last change on this file since fdd7961 was fdd7961, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 16 months ago

fix many to one relations

  • Property mode set to 100644
File size: 888 bytes
Line 
1package finki.paw5.model.entities;
2
3import jakarta.persistence.*;
4import lombok.Data;
5import lombok.RequiredArgsConstructor;
6
7@Data
8@Entity
9@RequiredArgsConstructor
10@Table(name = "organisation")
11public class Organisation {
12
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 @Column(name = "id_organisation")
16 private Integer id;
17
18 @Column(name = "name_organisation", nullable = false, length = 100)
19 private String name;
20
21 @Column(name = "email_organisation", nullable = false, length = 100, unique = true)
22 private String email;
23
24 @Column(name = "billing_information", nullable = false, length = 20, unique = true)
25 private String billingInformation;
26
27 public Organisation(String name, String email, String billingInformation) {
28 this.name = name;
29 this.email = email;
30 this.billingInformation = billingInformation;
31 }
32}
Note: See TracBrowser for help on using the repository browser.