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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by wang zhinan on 2018/4/26.
 */
@Entity
@Table(name = "wlyy_health_bank_activity")
public class ActivityDO extends UuidIdentityEntityWithOperator implements Serializable {

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

    @Column(name = "organizer")
    private String organizer; // 主办方&&发布机构

    @Column(name = "title")
    private String title;//活动标题

    @Column(name = "description")
    private String description;//活动说明

    @Column(name = "location")
    private String location;//活动地点

    @Column(name = "img")
    private String img;//活动图片


    @Column(name = "registration_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date registrationTime;//报名时间

    @Column(name = "activity_offline_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date activityOfflineTime; //活动下线时间

    @Column(name = "status")
    private Integer status;//状态（1代表有效，0代表无效,-1代表过期）

    @Column(name = "is_flag")
    private Integer isFlag;//标识是否有问卷（1：有，-1：没有）

    @Column(name = "area")
    private String area;//区域

    @Column(name = "area_type")
    private Integer areaType; //区域类型

    @Column(name = "remark")
    private String remark;//活动备注

    @Column(name = "type")
    private String type;//活动类型


    @Column(name = "dead_line")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date deadLine;//参与截止时间

    @Column(name = "crowd_type")
    private Integer crowdType;//面向人群

    @Column(name = "recommended")
    private Integer recommended;//是否推荐

    @Column(name = "info")
    private String info;//报名信息

    @Column(name="limit_register")
    private Integer limitRegister;//报名限制 0、所有居民可以报名，1、仅当前居民账号可报名

    @Column(name = "registration_number")
    private String registrationNumber;//报名人数

    @Column(name = "globel_template")
    private String globelTemplate;//通用模板
/*
    @Column(name = "del")
    private Integer del;//1有效0无效*/
    @Column(name = "del_flag")
    private Integer delFlag;//1有效0无效
  /*  *//**
     * 通用模板code
     *//*
    private String globelTemplate;*/
    /**
     * 活动发布、上线时间
     */
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
//    private Date releaseTime;
    /**
     * 实用范围名称
     */
    @Column(name = "area_name")
    private String areaName;

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

    @Column(name = "sort")
    private Integer sort;


    @Transient
    private String patientId;//居民id

    @Transient
    private String openId;//微信编码

    @Transient
    private String unionId;

    @Transient
    private String patientIdcard;//身份证号

    @Transient
    private Long total;//参加总数

    @Transient
    private Integer activityRanking;//活动中的积分的排名

    @Transient
    private Integer activityCouponRanking;//活动中积分劵的排名

    @Transient
    private List<TaskPatientDetailDO> taskPatientDetailDOS;//参与活动详情

    @Transient
    private List<TaskDO> taskDOS;//活动任务列表

    @Transient
    private Long sum;//活动积分总数

    @Transient
    private ActivityRuleDO activityRuleDO;//活动规则

    @Transient
    private List<TaskGoodsDO> taskGoodsDOS;//活动奖品

    @Transient
    private Integer flag;//标识是否为正在进行的活动 1、正在进行0，还未开始

    @Transient
    private Long nowTotal;//今日积分


    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }

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

    @Column(name = "organizer")
    public String getOrganizer() {
        return organizer;
    }

    public void setOrganizer(String organizer) {
        this.organizer = organizer;
    }

    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "location")
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

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

    @Column(name = "is_flag")
    public Integer getIsFlag() {
        return isFlag;
    }

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

    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name = "area")
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public Integer getAreaType() {
        return areaType;
    }

    public void setAreaType(Integer areaType) {
        this.areaType = areaType;
    }

    @Transient
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Transient
    public String getPatientId() {
        return patientId;
    }

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

    @Transient
    public Long getTotal() {
        return total;
    }

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

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Transient
    public List<TaskPatientDetailDO> getTaskPatientDetailDOS() {
        return taskPatientDetailDOS;
    }

    public void setTaskPatientDetailDOS(List<TaskPatientDetailDO> taskPatientDetailDOS) {
        this.taskPatientDetailDOS = taskPatientDetailDOS;
    }

    @Transient
    public String getUnionId() {
        return unionId;
    }

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

    @Transient
    public String getPatientIdcard() {
        return patientIdcard;
    }

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

    @Transient
    public Integer getActivityRanking() {
        return activityRanking;
    }

    public void setActivityRanking(Integer activityRanking) {
        this.activityRanking = activityRanking;
    }

    @Transient
    public Long getSum() {
        return sum;
    }

    public void setSum(Long sum) {
        this.sum = sum;
    }

    @Transient
    public List<TaskDO> getTaskDOS() {
        return taskDOS;
    }

    public void setTaskDOS(List<TaskDO> taskDOS) {
        this.taskDOS = taskDOS;
    }

    @Column(name = "registration_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getRegistrationTime() {
        return registrationTime;
    }

    public void setRegistrationTime(Date registrationTime) {
        this.registrationTime = registrationTime;
    }

    @Column(name = "activity_offline_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getActivityOfflineTime() {
        return activityOfflineTime;
    }

    public void setActivityOfflineTime(Date activityOfflineTime) {
        this.activityOfflineTime = activityOfflineTime;
    }

    @Column(name = "dead_line")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getDeadLine() {
        return deadLine;
    }

    public void setDeadLine(Date deadLine) {
        this.deadLine = deadLine;
    }

    @Column(name = "crowd_type")
    public Integer getCrowdType() {
        return crowdType;
    }

    public void setCrowdType(Integer crowdType) {
        this.crowdType = crowdType;
    }

    @Column(name = "recommended")
    public Integer getRecommended() {
        return recommended;
    }

    public void setRecommended(Integer recommended) {
        this.recommended = recommended;
    }

    @Column(name = "info")
    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }


    @Transient
    public ActivityRuleDO getActivityRuleDO() {
        return activityRuleDO;
    }

    public void setActivityRuleDO(ActivityRuleDO activityRuleDO) {
        this.activityRuleDO = activityRuleDO;
    }


    @Column(name="limit_register")
    public Integer getLimitRegister() {
        return limitRegister;
    }

    public void setLimitRegister(Integer limitRegister) {
        this.limitRegister = limitRegister;
    }

    @Column(name = "del_flag")
    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Column(name = "globel_template")
    public String getGlobelTemplate() {
        return globelTemplate;
    }

    public void setGlobelTemplate(String globelTemplate) {
        this.globelTemplate = globelTemplate;
    }

    @Transient
    public Integer getActivityCouponRanking() {
        return activityCouponRanking;
    }

    public void setActivityCouponRanking(Integer activityCouponRanking) {
        this.activityCouponRanking = activityCouponRanking;
    }

    @Transient
    public List<TaskGoodsDO> getTaskGoodsDOS() {
        return taskGoodsDOS;
    }

    public void setTaskGoodsDOS(List<TaskGoodsDO> taskGoodsDOS) {
        this.taskGoodsDOS = taskGoodsDOS;
    }

    @Column(name = "area_name")
    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Column(name = "registration_number")
    public String getRegistrationNumber() {
        return registrationNumber;
    }

    public void setRegistrationNumber(String registrationNumber) {
        this.registrationNumber = registrationNumber;
    }

    @Column(name = "introduction")
    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Transient
    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Transient
    public Long getNowTotal() {
        return nowTotal;
    }

    public void setNowTotal(Long nowTotal) {
        this.nowTotal = nowTotal;
    }


/*
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }*/


//    public Date getReleaseTime() {
//        return releaseTime;
//    }
//
//    public void setReleaseTime(Date releaseTime) {
//        this.releaseTime = releaseTime;
//    }

}
