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
RevLine 
[3d3e59d]1package finki.paw5.model.entities;
[d427a07]2
[579bf6d]3import jakarta.persistence.*;
[d427a07]4import lombok.Data;
5
[fdfc6fa]6import java.time.LocalDate;
[d427a07]7import java.util.Date;
8
9@Data
10@Entity
11@Table(name = "user_table")
[579bf6d]12@Inheritance(strategy = InheritanceType.JOINED)
[d427a07]13public class User {
14
15 @Id
[038c9f7]16 @GeneratedValue(strategy = GenerationType.IDENTITY)
[d427a07]17 @Column(name = "id_user")
[ada7108]18 protected Integer id;
[d427a07]19
20 @Column(name = "date_created_user", nullable = false)
[579bf6d]21 protected LocalDate dateCreated;
[d427a07]22
23 @Column(name = "name_user", nullable = false, length = 100)
[579bf6d]24 protected String name;
[d427a07]25
[579bf6d]26 @Column(name = "email_user", nullable = false, length = 100, unique = true)
27 protected String email;
[d427a07]28
29 @Column(name = "password_user", nullable = false, length = 20)
[579bf6d]30 protected String password;
[d427a07]31
[fdfc6fa]32 @Column(name = "telephone_user", length = 20)
[579bf6d]33 protected String telephone;
[d427a07]34
[fdfc6fa]35 public User(LocalDate dateCreated, String name, String email, String password, String telephone) {
[d427a07]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.