38 lines
806 B
Java
38 lines
806 B
Java
|
package at.technikumwien.movies;
|
||
|
|
||
|
import lombok.*;
|
||
|
|
||
|
import javax.persistence.*;
|
||
|
import java.time.LocalDate;
|
||
|
|
||
|
@Data
|
||
|
@NoArgsConstructor
|
||
|
@AllArgsConstructor
|
||
|
|
||
|
@Entity
|
||
|
@Table(name = "t_actors")
|
||
|
public class Actors {
|
||
|
@Id
|
||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||
|
private Long id;
|
||
|
|
||
|
@Column(length = 100, nullable = false)
|
||
|
private String firstname;
|
||
|
|
||
|
@Column(length = 100, nullable = false)
|
||
|
private String lastname;
|
||
|
|
||
|
@Column(nullable = false)
|
||
|
private Sex sex;
|
||
|
|
||
|
private LocalDate birthdate;
|
||
|
|
||
|
public Actors(String firstname, String lastname, Sex sex, LocalDate birthdate) {
|
||
|
this(null, firstname, lastname, sex, birthdate);
|
||
|
}
|
||
|
|
||
|
//TODO consider using
|
||
|
//@ManyToMany(mappedBy = 'actors')
|
||
|
//private List<at.technikumwien.movies.Movies> movies
|
||
|
}
|