source: Prototype Application/Paw5/src/main/java/finki/paw5/model/User.java@ 579bf6d

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

added inheritance

  • Property mode set to 100644
File size: 1.1 KB
Line 
1package finki.paw5.model;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.time.LocalDate;
7import java.util.Date;
8
9@Data
10@Entity
11@Table(name = "user_table")
12@Inheritance(strategy = InheritanceType.JOINED)
13public class User {
14
15 @Id
16 @Column(name = "id_user")
17 protected int id;
18
19 @Column(name = "date_created_user", nullable = false)
20 protected LocalDate dateCreated;
21
22 @Column(name = "name_user", nullable = false, length = 100)
23 protected String name;
24
25 @Column(name = "email_user", nullable = false, length = 100, unique = true)
26 protected String email;
27
28 @Column(name = "password_user", nullable = false, length = 20)
29 protected String password;
30
31 @Column(name = "telephone_user", length = 20)
32 protected String telephone;
33
34 public User(LocalDate dateCreated, String name, String email, String password, String telephone) {
35 this.dateCreated = dateCreated;
36 this.name = name;
37 this.email = email;
38 this.password = password;
39 this.telephone = telephone;
40 }
41
42 public User() {
43 }
44}
Note: See TracBrowser for help on using the repository browser.