diff --git a/demo/05-06/src/main/java/pl/edu/amu/demo/life/jpa/Person.java b/demo/05-06/src/main/java/pl/edu/amu/demo/life/jpa/Person.java new file mode 100644 index 0000000..d6d49b9 --- /dev/null +++ b/demo/05-06/src/main/java/pl/edu/amu/demo/life/jpa/Person.java @@ -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; + +}