package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * @author gongbiao
 */
@TableName(value = "wx_activity")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxActivity extends BaseEntity {

    protected Long id;


    @io.swagger.annotations.ApiModelProperty(value = "租户", name = "tenantId")
    private String tenantId;
    @io.swagger.annotations.ApiModelProperty(value = "封面图", name = "coverImg")
    private String coverImg;
    @io.swagger.annotations.ApiModelProperty(value = "主标题", name = "title")
    private String title;
    @io.swagger.annotations.ApiModelProperty(value = "副标题", name = "subTitle")
    private String subTitle;
    @io.swagger.annotations.ApiModelProperty(value = "使用积分1是0否", name = "useCredit")
    private Integer useCredit;
    @io.swagger.annotations.ApiModelProperty(value = "消耗积分", name = "credit")
    private Integer credit;
    @io.swagger.annotations.ApiModelProperty(value = "活动人数", name = "personLimit")
    private Integer personLimit;
    @io.swagger.annotations.ApiModelProperty(value = "活动正文", name = "detail")
    private String detail;
    @io.swagger.annotations.ApiModelProperty(value = "活动开始报名时间", name = "startTime")
    private Date startTime;
    @io.swagger.annotations.ApiModelProperty(value = "活动结束报名时间", name = "endTime")
    private Date endTime;
    @io.swagger.annotations.ApiModelProperty(value = "类型 1固定格式2自由图文", name = "type")
    private Integer type;
    @io.swagger.annotations.ApiModelProperty(value = "0已保存 1已下线 2已投放", name = "status")
    private Integer status;
    @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createTime")
    private Date createTime;
    @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateTime")
    private Date updateTime;
    @io.swagger.annotations.ApiModelProperty(value = "富文本", name = "html")
    private String html;
    @io.swagger.annotations.ApiModelProperty(value = "问题", name = "question")
    private String question;

    @io.swagger.annotations.ApiModelProperty(value = "是否过期1是0否", name = "isExpired")
    private Integer isExpired;

    @io.swagger.annotations.ApiModelProperty(value = "活动开始时间", name = "activityStartTime")
    private Date activityStartTime;
    @io.swagger.annotations.ApiModelProperty(value = "活动结束时间", name = "activityEndTime")
    private Date activityEndTime;


    @io.swagger.annotations.ApiModelProperty(value = "是否上传图片1是0否", name = "useImg")
    private Integer useImg;

    @io.swagger.annotations.ApiModelProperty(value = "图片说明", name = "imgDetail")
    private String imgDetail;

    @io.swagger.annotations.ApiModelProperty(value = "是否发送短信1是0否", name = "sendMsg")
    private Integer sendMsg;

    @TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime")
    private Date starttime;

    @TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime")
    private Date endtime;


    @TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "报名小程序路径", name = "weappPath")
    protected String weappPath;

    @TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "报名二维码", name = "weappSceneForJoin")
    protected String weappSceneForJoin;

    public String getWeappPath() {
        return "pages/index/index?type=ra&id=" + id;
    }

    public String getWeappSceneForJoin() {
        return "t:ra:" + id;
    }


    @TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "签到小程序路径", name = "weappPath")
    protected String weappPathForSign;

    @TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "签到二维码", name = "weappSceneForSign")
    protected String weappSceneForSign;

    public String getWeappPathForSign() {
        return "pages/index/index?type=si&id=" + id;
    }

    public String getWeappSceneForSign() {
        return "t:si:" + id;
    }

    @io.swagger.annotations.ApiModelProperty(value = "常见问题选择", name = "selectques")
    private String selectques;

}

