| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | import javax.persistence.CascadeType; |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.EntityListeners; |
| | | import javax.persistence.EnumType; |
| | | import javax.persistence.Enumerated; |
| | | import javax.persistence.FetchType; |
| | | import javax.persistence.GeneratedValue; |
| | | import javax.persistence.GenerationType; |
| | | import javax.persistence.Id; |
| | | import javax.persistence.JoinColumn; |
| | | import javax.persistence.OneToMany; |
| | | import javax.persistence.OneToOne; |
| | | import javax.persistence.Table; |
| | | |
| | | import org.springframework.data.annotation.CreatedDate; |
| | | import org.springframework.data.annotation.LastModifiedDate; |
| | | import org.springframework.data.jpa.domain.support.AuditingEntityListener; |
| | | |
| | | import com.pollex.pam.enums.AppointmentStatusEnum; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | | |
| | | @EntityListeners(AuditingEntityListener.class) |
| | | @Entity |
| | | @Table(name = "appointment") |
| | | public class Appointment implements Serializable { |
| | | |
| | | /** |
| | | * |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Long id; |
| | | |
| | | |
| | | @Column(name = "phone") |
| | | private String phone; |
| | | |
| | | |
| | | @Column(name = "email") |
| | | private String email; |
| | | |
| | | |
| | | @Column(name = "contact_type") |
| | | private String contactType; |
| | | |
| | | |
| | | @Column(name = "gender") |
| | | private String gender; |
| | | |
| | | |
| | | @Column(name = "age") |
| | | private int age; |
| | | |
| | | private String age; |
| | | |
| | | @Column(name = "job") |
| | | private String job; |
| | | |
| | | |
| | | @Column(name = "requirement") |
| | | private String requirement; |
| | | |
| | | |
| | | @Enumerated(EnumType.STRING) |
| | | @Column(name = "communicate_status") |
| | | private ContactStatusEnum communicateStatus; |
| | | |
| | | |
| | | @Column(name = "hope_contact_time") |
| | | private String hopeContactTime; |
| | | |
| | | |
| | | @Column(name = "other_requirement") |
| | | private String otherRequirement; |
| | | |
| | | @Column(name = "appointment_date") |
| | | |
| | | @CreatedDate |
| | | @Column(name = "appointment_date", updatable = false) |
| | | private Instant appointmentDate = Instant.now(); |
| | | |
| | | |
| | | @Column(name = "last_modified_date") |
| | | @LastModifiedDate |
| | | private Instant lastModifiedDate = Instant.now(); |
| | | |
| | | @Column(name = "agent_no") |
| | | private String agentNo; |
| | | |
| | | |
| | | @Column(name = "customer_id") |
| | | private Long customerId; |
| | | |
| | | @Column(name = "consultant_view_time") |
| | | private Instant consultantViewTime; |
| | | |
| | | @Column(name = "consultant_read_time") |
| | | private Instant consultantReadTime; |
| | | |
| | | @Column(name = "contact_time") |
| | | private Instant contactTime; |
| | | |
| | | @Enumerated(value = EnumType.STRING) |
| | | @Column(name = "status") |
| | | private AppointmentStatusEnum status; |
| | | |
| | | @JoinColumn(name = "appointment_id") |
| | | @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) |
| | | private List<AppointmentMemo> appointmentMemoList; |
| | | |
| | | // @OneToOne(cascade = CascadeType.REMOVE,fetch=FetchType.EAGER) |
| | | //// @JoinColumn(name = "form_authority_id", referencedColumnName = "id") |
| | | // @JoinColumn(name = "appointment_id", referencedColumnName = "id") |
| | | // private AppointmentClosedInfo closedInfo; |
| | | |
| | | // @OneToOne(cascade = CascadeType.REMOVE |
| | | // , mappedBy = "appointment", fetch=FetchType.LAZY) |
| | | // private AppointmentClosedInfo closedInfo; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | this.gender = gender; |
| | | } |
| | | |
| | | public int getAge() { |
| | | public String getAge() { |
| | | return age; |
| | | } |
| | | |
| | | public void setAge(int age) { |
| | | public void setAge(String age) { |
| | | this.age = age; |
| | | } |
| | | |
| | |
| | | public void setCustomerId(Long customerId) { |
| | | this.customerId = customerId; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public Instant getConsultantViewTime() { |
| | | return consultantViewTime; |
| | | } |
| | | |
| | | public void setConsultantViewTime(Instant consultantViewTime) { |
| | | this.consultantViewTime = consultantViewTime; |
| | | } |
| | | |
| | | public Instant getConsultantReadTime() { |
| | | return consultantReadTime; |
| | | } |
| | | |
| | | public void setConsultantReadTime(Instant consultantReadTime) { |
| | | this.consultantReadTime = consultantReadTime; |
| | | } |
| | | |
| | | public Instant getContactTime() { |
| | | return contactTime; |
| | | } |
| | | |
| | | public void setContactTime(Instant markCommunicateTime) { |
| | | this.contactTime = markCommunicateTime; |
| | | } |
| | | |
| | | public AppointmentStatusEnum getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(AppointmentStatusEnum status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Instant getLastModifiedDate() { |
| | | return lastModifiedDate; |
| | | } |
| | | |
| | | public void setLastModifiedDate(Instant lastModifiedDate) { |
| | | this.lastModifiedDate = lastModifiedDate; |
| | | } |
| | | |
| | | public List<AppointmentMemo> getAppointmentMemoList() { |
| | | return appointmentMemoList; |
| | | } |
| | | |
| | | public void setAppointmentMemoList(List<AppointmentMemo> appointmentMemoList) { |
| | | this.appointmentMemoList = appointmentMemoList; |
| | | } |
| | | |
| | | // public AppointmentClosedInfo getClosedInfo() { |
| | | // return closedInfo; |
| | | // } |
| | | // |
| | | // public void setClosedInfo(AppointmentClosedInfo closedInfo) { |
| | | // this.closedInfo = closedInfo; |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | } |