package com.btpn.empolyee.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

@Entity
@Table(name = "employee")
public class Employee {

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	private String id;
	
	@NotBlank
	@Column(name = "first_name", length = 25)
	private String firstName;
	private String lastName;
	private String gender;
	private Date dateOfBirth;
	private String nationality;
	private String martialStatus;
	private String phone;
	private String email;
	private Date hiredDate;
	private Date suspendDate;
	private String division;
	private String grade;
	private String subDivision;
	private String status;
	
	
}

@@ -225,59 +225,164 @@
 nce.
-Table;%0D%0Aimport javax.validation.constraints.NotNull
+JoinColumn;%0D%0Aimport javax.persistence.ManyToOne;%0D%0Aimport javax.persistence.Table;%0D%0Aimport javax.persistence.Temporal;%0D%0Aimport javax.persistence.TemporalType
 ;%0D%0A%0D
@@ -434,16 +434,67 @@
 rator;%0D%0A
+import org.hibernate.validator.constraints.Email;%0D%0A
 import o
@@ -542,62 +542,8 @@
 nk;%0D
-%0Aimport org.hibernate.validator.constraints.NotEmpty;%0D
 %0A%0D%0A@
@@ -780,16 +780,34 @@
 gth = 25
+, nullable = false
 )%0D%0A%09priv
@@ -834,358 +834,1267 @@
 ;%0D%0A%09
-private String lastName;%0D%0A%09private String gender;%0D%0A%09private Date dateOfBirth;%0D%0A%09private String nationality;%0D%0A%09private String martialStatus;%0D%0A%09private String phone;%0D%0A%09private String email;%0D%0A%09private Date hiredDate;%0D%0A%09private Date suspendDate;%0D%0A%09private String division;%0D%0A%09private String grade;%0D%0A%09private String subDivision;%0D%0A%09private String status;%0D%0A%09
+%0D%0A%09@NotBlank%0D%0A%09@Column(name = %22last_name%22, length = 25, nullable = false)%0D%0A%09private String lastName;%0D%0A%09%0D%0A%09@NotBlank%0D%0A%09@Column(length = 6, nullable = false)%0D%0A%09private String gender;%0D%0A%09%0D%0A%09@NotBlank%0D%0A%09@Column(name = %22date_of_birth%22, nullable = false)%0D%0A%09@Temporal(TemporalType.DATE)%0D%0A%09private Date dateOfBirth;%0D%0A%09%0D%0A%09@NotBlank%0D%0A%09@Column(length = 25, nullable = true)%0D%0A%09private String nationality;%0D%0A%09%0D%0A%09@Column(name = %22martial_status%22, length = 7, nullable = true)%0D%0A%09private String martialStatus;%0D%0A%09%0D%0A%09@Column(length = 15, nullable = true)%0D%0A%09private String phone;%0D%0A%09%0D%0A%09@Email%0D%0A%09@Column(nullable = false, unique = true, length = 50)%0D%0A%09private String email;%0D%0A%09%0D%0A%09@Column(name = %22hired_date%22, nullable = true)%0D%0A%09@Temporal(TemporalType.DATE)%0D%0A%09private Date hiredDate;%0D%0A%09%0D%0A%09@Column(name = %22suspend_date%22, nullable = true)%0D%0A%09@Temporal(TemporalType.DATE)%0D%0A%09private Date suspendDate;%0D%0A%09%0D%0A%09@Column(nullable = true)%0D%0A%09private String division;%0D%0A%09%0D%0A%09@Column(nullable = true)%0D%0A%09private String grade;%0D%0A%09%0D%0A%09@Column(name = %22sub_division%22, nullable = true)%0D%0A%09private String subDivision;%0D%0A%09%0D%0A%09@Column(nullable = true)%0D%0A%09private String status;%0D%0A%09%0D%0A%09@Column(nullable = true)%0D%0A%09private String photo;%0D%0A%09%0D%0A%09@ManyToOne%0D%0A%09@JoinColumn(name = %22id_city%22, nullable = false)%0D%0A%09private City city;
 %0D%0A%09%0D

add ORM