package com.yihu.jw.entity.door;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.BaseIdentityEntity;
import org.springframework.data.annotation.LastModifiedBy;

import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * Created by zdm on 2019/3/13.
 * 上门服务资质评审表
 */
@Entity
@Table(name = "wlyy_door_service_application")
@SequenceGenerator(name="id_generated", sequenceName="wlyy_door_service_application")
public class WlyyDoorServiceApplicationDo extends BaseIdentityEntity {
    /**居民code*/
    private String patient;
    /**居民姓名*/
    private String patientName;
    /**居民身份证*/
    private String patientIdcard;
    /**居民地址*/
    private String patientAddr;
    /**联系方式*/
    private String patientPhone;
    /**补充描述*/
    private String applicationDescribe;
    /**代理申请居民code*/
    private String proxyPatient;
    /**代理申请居民姓名*/
    private String proxyPatientName;
    /**有效开始时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date startTime;
    /**有效截止时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date endTime;
    /**是否为永久生效：0不是，1是*/
    private Integer effectiveFlag;
    /**审核人类型：1调度员、2家医*/
    private Integer auditorType;
    /**审核人code*/
    private String auditorCode;
    /**审核人姓名*/
    private String auditorName;
    /**审核时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date auditTime;
    /**审核未通过原因*/
    private String failureReasons;
    /**是否有效 -1删除，0审核中，1未通过，2审核通过，3已过期*/
    private Integer status;
    /**
     * 资质凭证
     */
    private List<WlyyDoorServiceVoucherDo> wlyyDoorServiceVoucherDos;

    //更新者
    @LastModifiedBy
    protected String updateUser;

    //更新者
    @LastModifiedBy
    protected String updateUserName;

    public String getPatient() {
        return patient;
    }

    public void setPatient(String patient) {
        this.patient = patient;
    }

    public String getProxyPatient() {
        return proxyPatient;
    }

    public void setProxyPatient(String proxyPatient) {
        this.proxyPatient = proxyPatient;
    }

    public String getProxyPatientName() {
        return proxyPatientName;
    }

    public void setProxyPatientName(String proxyPatientName) {
        this.proxyPatientName = proxyPatientName;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getPatientIdcard() {
        return patientIdcard;
    }

    public void setPatientIdcard(String patientIdcard) {
        this.patientIdcard = patientIdcard;
    }

    public String getPatientAddr() {
        return patientAddr;
    }

    public void setPatientAddr(String patientAddr) {
        this.patientAddr = patientAddr;
    }

    public String getPatientPhone() {
        return patientPhone;
    }

    public void setPatientPhone(String patientPhone) {
        this.patientPhone = patientPhone;
    }

    public String getApplicationDescribe() {
        return applicationDescribe;
    }

    public void setApplicationDescribe(String applicationDescribe) {
        this.applicationDescribe = applicationDescribe;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Transient
    public Integer getEffectiveFlag() {
        return effectiveFlag;
    }

    public void setEffectiveFlag(Integer effectiveFlag) {
        this.effectiveFlag = effectiveFlag;
    }

    public Integer getAuditorType() {
        return auditorType;
    }

    public void setAuditorType(Integer auditorType) {
        this.auditorType = auditorType;
    }

    public String getAuditorCode() {
        return auditorCode;
    }

    public void setAuditorCode(String auditorCode) {
        this.auditorCode = auditorCode;
    }

    public String getAuditorName() {
        return auditorName;
    }

    public void setAuditorName(String auditorName) {
        this.auditorName = auditorName;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public String getFailureReasons() {
        return failureReasons;
    }

    public void setFailureReasons(String failureReasons) {
        this.failureReasons = failureReasons;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Transient
    public List<WlyyDoorServiceVoucherDo> getWlyyDoorServiceVoucherDos() {
        return wlyyDoorServiceVoucherDos;
    }

    public void setWlyyDoorServiceVoucherDos(List<WlyyDoorServiceVoucherDo> wlyyDoorServiceVoucherDos) {
        this.wlyyDoorServiceVoucherDos = wlyyDoorServiceVoucherDos;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
}
