Last change
on this file since 428c8a4 was e6b2246, checked in by milamihajlovska <mila.mihajlovska01@…>, 22 months ago |
added models
|
-
Property mode
set to
100644
|
File size:
980 bytes
|
Line | |
---|
1 | package com.example.moviezone.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Getter;
|
---|
5 | import lombok.Setter;
|
---|
6 | import lombok.ToString;
|
---|
7 |
|
---|
8 | import java.time.LocalDateTime;
|
---|
9 |
|
---|
10 | @Entity
|
---|
11 | @Getter
|
---|
12 | @Setter
|
---|
13 | @ToString
|
---|
14 | @Table(name = "users")
|
---|
15 | @Inheritance(strategy = InheritanceType.JOINED)
|
---|
16 | public class User {
|
---|
17 |
|
---|
18 | @Id
|
---|
19 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
20 | Integer id_user;
|
---|
21 | String password;
|
---|
22 | String first_name;
|
---|
23 | String last_name;
|
---|
24 | String address;
|
---|
25 | String contact_number;
|
---|
26 | LocalDateTime date_created;
|
---|
27 |
|
---|
28 |
|
---|
29 | public User(Integer id_user, String password, String first_name, String last_name, String address, String contact_number, LocalDateTime date_created) {
|
---|
30 | this.id_user = id_user;
|
---|
31 | this.password = password;
|
---|
32 | this.first_name = first_name;
|
---|
33 | this.last_name = last_name;
|
---|
34 | this.address = address;
|
---|
35 | this.contact_number = contact_number;
|
---|
36 | this.date_created = date_created;
|
---|
37 | }
|
---|
38 |
|
---|
39 | public User() {
|
---|
40 |
|
---|
41 | }
|
---|
42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.