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

main
Last change on this file since ada7108 was ada7108, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 17 months ago

change ids from int to Integer

Co-Authored-By: SazdovaEkaterina <74919977+SazdovaEkaterina@…>

  • 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 Integer 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.