main
Last change
on this file since 7fafead was 7fafead, checked in by Test <matonikolov77@…>, 3 years ago |
Resolving models
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | package com.wediscussmovies.project.model;
|
---|
2 |
|
---|
3 | import com.wediscussmovies.project.model.enumerations.PersonType;
|
---|
4 | import lombok.Data;
|
---|
5 |
|
---|
6 | import javax.persistence.*;
|
---|
7 | import java.sql.Date;
|
---|
8 | import java.util.Collection;
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Entity
|
---|
12 | @Table(name = "persons", schema = "project", catalog = "db_202122z_va_prj_wediscussmovies")
|
---|
13 | @Data
|
---|
14 | public class Person {
|
---|
15 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
16 | @Id
|
---|
17 | @Column(name = "person_id")
|
---|
18 | private Long personId;
|
---|
19 |
|
---|
20 | private String name;
|
---|
21 |
|
---|
22 | private String surname;
|
---|
23 |
|
---|
24 | @Enumerated
|
---|
25 | private PersonType type;
|
---|
26 |
|
---|
27 | @Column(name = "date_of_birth")
|
---|
28 | private Date birthDate;
|
---|
29 |
|
---|
30 | @Column(name = "image_url")
|
---|
31 | private String imageUrl;
|
---|
32 |
|
---|
33 | private String description;
|
---|
34 |
|
---|
35 |
|
---|
36 |
|
---|
37 | public Person() {
|
---|
38 | }
|
---|
39 |
|
---|
40 | public Person(String name, String surname, PersonType type, Date date_of_birth, String image_url, String description) {
|
---|
41 | this.name = name;
|
---|
42 | this.surname = surname;
|
---|
43 | this.type = type;
|
---|
44 | this.birthDate = date_of_birth;
|
---|
45 | this.imageUrl = image_url;
|
---|
46 | this.description = description;
|
---|
47 | }
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.