main
|
Last change
on this file was 700e2f9, checked in by 186079 <matej.milevski@…>, 5 days ago |
|
Init
|
-
Property mode
set to
100644
|
|
File size:
900 bytes
|
| Line | |
|---|
| 1 | package com.finki.icare.model;
|
|---|
| 2 |
|
|---|
| 3 | import jakarta.persistence.*;
|
|---|
| 4 | import lombok.AllArgsConstructor;
|
|---|
| 5 | import lombok.Data;
|
|---|
| 6 | import lombok.NoArgsConstructor;
|
|---|
| 7 |
|
|---|
| 8 | @Entity
|
|---|
| 9 | @Table(name = "\"user\"")
|
|---|
| 10 | @Data
|
|---|
| 11 | @NoArgsConstructor
|
|---|
| 12 | @AllArgsConstructor
|
|---|
| 13 | @Inheritance(strategy = InheritanceType.JOINED)
|
|---|
| 14 | public class User {
|
|---|
| 15 |
|
|---|
| 16 | @Id
|
|---|
| 17 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|---|
| 18 | @Column(name = "id_user")
|
|---|
| 19 | private Integer idUser;
|
|---|
| 20 |
|
|---|
| 21 | @Column(name = "username", nullable = false, unique = true, length = 50)
|
|---|
| 22 | private String username;
|
|---|
| 23 |
|
|---|
| 24 | @Column(name = "name", nullable = false, length = 100)
|
|---|
| 25 | private String name;
|
|---|
| 26 |
|
|---|
| 27 | @Column(name = "surname", nullable = false, length = 100)
|
|---|
| 28 | private String surname;
|
|---|
| 29 |
|
|---|
| 30 | @Column(name = "email", nullable = false, unique = true, length = 255)
|
|---|
| 31 | private String email;
|
|---|
| 32 |
|
|---|
| 33 | @Column(name = "password", nullable = false, length = 255)
|
|---|
| 34 | private String password;
|
|---|
| 35 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.