source: Git/src/main/java/com/wediscussmovies/project/model/Person.java@ 7fafead

main
Last change on this file since 7fafead was 7fafead, checked in by Test <matonikolov77@…>, 2 years ago

Resolving models

  • Property mode set to 100644
File size: 1.1 KB
Line 
1package com.wediscussmovies.project.model;
2
3import com.wediscussmovies.project.model.enumerations.PersonType;
4import lombok.Data;
5
6import javax.persistence.*;
7import java.sql.Date;
8import java.util.Collection;
9import java.util.List;
10
11@Entity
12@Table(name = "persons", schema = "project", catalog = "db_202122z_va_prj_wediscussmovies")
13@Data
14public 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.