source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/User.java@ 4846b7a

main
Last change on this file since 4846b7a was 3d3e59d, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago

move entity models to separate folder

  • Property mode set to 100644
File size: 1.1 KB
Line 
1package finki.paw5.model.entities;
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 @GeneratedValue(strategy = GenerationType.IDENTITY)
17 @Column(name = "id_user")
18 protected int id;
19
20 @Column(name = "date_created_user", nullable = false)
21 protected LocalDate dateCreated;
22
23 @Column(name = "name_user", nullable = false, length = 100)
24 protected String name;
25
26 @Column(name = "email_user", nullable = false, length = 100, unique = true)
27 protected String email;
28
29 @Column(name = "password_user", nullable = false, length = 20)
30 protected String password;
31
32 @Column(name = "telephone_user", length = 20)
33 protected String telephone;
34
35 public User(LocalDate dateCreated, String name, String email, String password, String telephone) {
36 this.dateCreated = dateCreated;
37 this.name = name;
38 this.email = email;
39 this.password = password;
40 this.telephone = telephone;
41 }
42
43 public User() {
44 }
45}
Note: See TracBrowser for help on using the repository browser.