main
Last change
on this file since 6a17c29 was d427a07, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago |
add models and enums
|
-
Property mode
set to
100644
|
File size:
895 bytes
|
Rev | Line | |
---|
[d427a07] | 1 | package finki.paw5.model;
|
---|
| 2 |
|
---|
| 3 | import jakarta.persistence.Column;
|
---|
| 4 | import jakarta.persistence.Entity;
|
---|
| 5 | import jakarta.persistence.Id;
|
---|
| 6 | import jakarta.persistence.Table;
|
---|
| 7 | import lombok.Data;
|
---|
| 8 |
|
---|
| 9 | @Data
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "organisation")
|
---|
| 12 | public class Organisation {
|
---|
| 13 |
|
---|
| 14 | @Id
|
---|
| 15 | @Column(name = "id_organisation")
|
---|
| 16 | private int 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 |
|
---|
| 33 | public Organisation() {
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.