Person entity.

This commit is contained in:
Paweł Dyda 2022-12-03 12:24:51 +01:00
parent 1e84b25b23
commit 7c8691b34d

View File

@ -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;
}