Person entity.
This commit is contained in:
parent
1e84b25b23
commit
7c8691b34d
@ -0,0 +1,31 @@
|
||||
package pl.edu.amu.demo.life.jpa;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class Person {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE)
|
||||
@Column(name = "person_id")
|
||||
private Long id;
|
||||
|
||||
@Column(name = "person_display_name", nullable = false)
|
||||
private String displayName; // i18n compliance
|
||||
|
||||
@Column(name = "person_first_name")
|
||||
private String firstName;
|
||||
|
||||
@Column(name = "person_last_name")
|
||||
private String lastName;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user