Changeset 2a5d6a3 in Git for src/main/java/com/wediscussmovies/project/model/Person.java
- Timestamp:
- 01/16/22 15:29:49 (3 years ago)
- Branches:
- main
- Children:
- 7bc8942
- Parents:
- 7a0bf79
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/model/Person.java
r7a0bf79 r2a5d6a3 5 5 import javax.persistence.*; 6 6 import java.sql.Date; 7 import java.util.Comparator; 7 8 import java.util.List; 8 9 9 10 @Data 10 @Entity(name="persons") 11 @Entity 12 @Table(name="persons") 11 13 public class Person { 12 14 @Id … … 34 36 @ManyToMany 35 37 private List<Movie> acts_in; 38 39 public Person(String name, String surname, PersonType personType, Date date_of_birth, String image_url, String description) { 40 this.name = name; 41 this.surname = surname; 42 this.personType = personType; 43 this.date_of_birth = date_of_birth; 44 this.image_url = image_url; 45 this.description = description; 46 } 47 48 public Person() { 49 } 50 51 public static Comparator<Person> personComparatorByNameSurname = Comparator.comparing(Person::getName).thenComparing(Person::getSurname); 36 52 } 37 53
Note:
See TracChangeset
for help on using the changeset viewer.