Skip to content

Instantly share code, notes, and snippets.

@lgsantiago
Created January 4, 2018 17:44
Show Gist options
  • Select an option

  • Save lgsantiago/97bf34b954c51a1f4ea37f56d02440be to your computer and use it in GitHub Desktop.

Select an option

Save lgsantiago/97bf34b954c51a1f4ea37f56d02440be to your computer and use it in GitHub Desktop.
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
@Data
@Entity
public class Patient {
Patient() {} // JPA requires a default constructor for Entities.
public Patient(String firstName, String lastName, String phone) {
this.firstName = firstName;
this.lastName = lastName;
this.phone = phone;
}
@Id
@GeneratedValue
private Long id;
private String firstName;
private String lastName;
private String phone;
private String license;
private Date dob;
private Long insurance;
private Date lastVisit;
private Date createdDate;
private Date updatedDate;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment