package com.yihu.jw.entity.health.bank;

import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

/**
 * Created by wamg zhinan 2018/4/27.
 */
@Entity
@Table(name = "wlyy_health_bank_task_patient_detail")
public class TaskPatientDetailDO extends UuidIdentityEntityWithOperator implements Serializable{

    @Column(name = "saas_id")
    private String saasId; //saasid

    @Column(name = "status")
    private Integer status;//任务完整状态：1完成，0参与，-1作废

    @Column(name = "patient_id")
    private String patientId;//居民id

    @Column(name = "patient_idcard")
    private String patientIdcard;//居民身份证

    @Column(name = "patient_openid")
    private String patientOpenid;//居民openid

    @Column(name = "doctor_id")
    private String doctorId;//医生id

    @Column(name = "task_id")
    private String taskId;//任务id

    @Column(name = "activity_id")
    private String activityId;//活动id

    @Column(name = "total")
    private Long total;//活动中获取的积分

    @Column(name = "coupon_total")
    private Long couponTotal;//活动劵总数

    @Column(name = "union_id")
    private String unionId;

    @Column(name = "hospital")
    private String hospital;

    @Column(name = "street")
    private String street;

    @Column(name = "street_name")
    private String streetName;

    @Column(name = "town")
    private String town;

    @Column(name = "town_name")
    private String townName;

    @Transient
    private AccountDO accountDO;//账户信息

    @Transient
    private Integer isFlag;//标识是否为当前用户

    @Transient
    private String taskCode;//任务标识

    @Transient
    private String name;//居民名称


    @Column(name = "hopital_name")
    private String hospitalName;//社区名称

    @Transient
    private String timeSeparated;//至今多久

    @Transient
    private List<ExchangeGoodsDO> exchangeGoodsDO;//兑换商品

    @Transient
    private ActivityDO activityDO ;//活动实体

    public String getSaasId() {
        return saasId;
    }

    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }

    public Integer getStatus() {
        return status;
    }

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

    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }

    @Convert(converter = StringFStringEncryptConverter.class)
    public String getPatientIdcard() {
        return patientIdcard;
    }

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

    public String getPatientOpenid() {
        return patientOpenid;
    }

    public void setPatientOpenid(String patientOpenid) {
        this.patientOpenid = patientOpenid;
    }

    public String getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    @Transient
    public AccountDO getAccountDO() {
        return accountDO;
    }

    public void setAccountDO(AccountDO accountDO) {
        this.accountDO = accountDO;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    @Transient
    public Integer getIsFlag() {
        return isFlag;
    }

    public void setIsFlag(Integer isFlag) {
        this.isFlag = isFlag;
    }

    @Transient
    public String getTaskCode() {
        return taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    @Transient
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }


    @Column(name = "coupon_total")
    public Long getCouponTotal() {
        return couponTotal;
    }

    public void setCouponTotal(Long couponTotal) {
        this.couponTotal = couponTotal;
    }

    @Transient
    public String getTimeSeparated() {
        return timeSeparated;
    }

    public void setTimeSeparated(String timeSeparated) {
        this.timeSeparated = timeSeparated;
    }


    @Column(name = "street")
    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    @Transient
    public List<ExchangeGoodsDO> getExchangeGoodsDO() {
        return exchangeGoodsDO;
    }

    public void setExchangeGoodsDO(List<ExchangeGoodsDO> exchangeGoodsDO) {
        this.exchangeGoodsDO = exchangeGoodsDO;
    }

    @Transient
    public ActivityDO getActivityDO() {
        return activityDO;
    }

    public void setActivityDO(ActivityDO activityDO) {
        this.activityDO = activityDO;
    }

    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }

    public void setTownName(String townName) {
        this.townName = townName;
    }

    @Column(name = "town")
    public String getTown() {
        return town;
    }

    public void setTown(String town) {
        this.town = town;
    }

    @Column(name = "street_name")
    public String getStreetName() {
        return streetName;
    }

    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }
}
