package com.yonge.cooleshow.biz.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.enums.activity.ActivityRankingMethodEnum;
import com.yonge.cooleshow.biz.dal.enums.activity.ActivityRankingRuleEnum;
import com.yonge.cooleshow.common.enums.ActivityTypeEnum;
import com.yonge.cooleshow.common.enums.RegistrationMethodEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 活动计划表
 */
@TableName("activity_plan")
@ApiModel(value = "ActivityPlan对象", description = "活动计划表")
public class ActivityPlan implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键 ")
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "活动类型 EVALUATION 评测活动 STANDARD_GIFT 达标赠送 SHARE分享活动", required = true)
    @TableField(value = "activity_type_")
    @NotNull(message = "活动类型不能为空")
    private ActivityTypeEnum activityType;
    @ApiModelProperty(value = "活动应用：STUDENT 学生端 TEACHER 老师端", required = true)
    @TableField(value = "activity_client_")
    @NotNull(message = "活动应用不能为空")
    private ClientEnum activityClient;
    @ApiModelProperty("活动名称 ")
    @TableField(value = "activity_name_")
    @NotBlank(message = "活动名称不能为空")
    private String activityName;
    @ApiModelProperty("活动描述 ")
    @TableField(value = "describe_")
    @NotBlank(message = "活动描述不能为空")
    private String describe;
    @ApiModelProperty("规则描述 ")
    @TableField(value = "rule_describe_")
    private String ruleDescribe;
    @ApiModelProperty("主题图片 ")
    @TableField(value = "subject_url_")
    private String subjectUrl;
    @ApiModelProperty("平铺背景 ")
    @TableField(value = "background_url_")
    private String backgroundUrl;
    @ApiModelProperty("分享图片 ")
    @TableField(value = "share_url_")
    private String shareUrl;
    @ApiModelProperty("活动链接 ")
    @TableField(value = "activity_url_")
    private String activityUrl;
    @ApiModelProperty("活动时间-开始 ")
    @TableField(value = "activity_start_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @NotNull(message = "活动开始时间不能为空")
    private Date activityStart;
    @ApiModelProperty("活动时间-结束 ")
    @TableField(value = "activity_end_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @NotNull(message = "活动结束时间不能为空")
    private Date activityEnd;
    @ApiModelProperty("报名方式 FREE 免费 CHARGE 收费 ")
    @TableField(value = "registration_method_")
    private RegistrationMethodEnum registrationMethod;
    @ApiModelProperty("报名价格 ")
    @TableField(value = "registration_price_")
    private BigDecimal registrationPrice;
    @ApiModelProperty("分润比例 ")
    @TableField(value = "share_rate_")
    private BigDecimal shareRate;
    @ApiModelProperty("创建状态 0 正式 1 草稿 ")
    @TableField(value = "draft_flag_")
    private Integer draftFlag;
    @ApiModelProperty("活动状态 0 停用 1 启用 ")
    @TableField(value = "activity_state_")
    private Integer activityState;
    @ApiModelProperty("发奖状态（完成状态） 0 未发奖 1 已发奖 ")
    @TableField(value = "reward_flag_")
    private Integer rewardFlag;
    @ApiModelProperty(value = "活动分类类型, MUSIC_SHEET(曲谱) MUSIC(音乐) VIP(会员) VIDEO(视频) LIVE(直播) GOODS(商品)")
    @TableField(value = "share_type_")
    private String shareType;
    @ApiModelProperty("创建时间 ")
    @TableField(value = "create_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @ApiModelProperty("创建人 ")
    @TableField(value = "create_by_")
    private Long createBy;
    @ApiModelProperty("更新时间 ")
    @TableField(value = "update_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @ApiModelProperty("更新人 ")
    @TableField(value = "update_by_")
    private Long updateBy;

    @ApiModelProperty("奖励名次 ")
    @TableField(value = "ranking_")
    private Integer ranking;

    @ApiModelProperty("名次规则: EVALUATIONS_NUMBER(评测次数) EVALUATIONS_TIME(评测时间) ")
    @TableField(value = "ranking_rule_")
    private ActivityRankingRuleEnum rankingRule;

    @ApiModelProperty("活动形式: MUSIC_RANKING(单曲排名) TOTAL_SCORE(总分排名) ")
    @TableField(value = "ranking_method_")
    private ActivityRankingMethodEnum rankingMethod;

    @ApiModelProperty("获奖分数 ")
    @TableField(value = "ranking_score_")
    private Double rankingScore;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public ActivityTypeEnum getActivityType() {
        return activityType;
    }

    public void setActivityType(ActivityTypeEnum activityType) {
        this.activityType = activityType;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getRuleDescribe() {
        return ruleDescribe;
    }

    public void setRuleDescribe(String ruleDescribe) {
        this.ruleDescribe = ruleDescribe;
    }

    public String getSubjectUrl() {
        return subjectUrl;
    }

    public void setSubjectUrl(String subjectUrl) {
        this.subjectUrl = subjectUrl;
    }

    public String getBackgroundUrl() {
        return backgroundUrl;
    }

    public void setBackgroundUrl(String backgroundUrl) {
        this.backgroundUrl = backgroundUrl;
    }

    public Date getActivityStart() {
        return activityStart;
    }

    public void setActivityStart(Date activityStart) {
        this.activityStart = activityStart;
    }

    public Date getActivityEnd() {
        return activityEnd;
    }

    public void setActivityEnd(Date activityEnd) {
        this.activityEnd = activityEnd;
    }

    public RegistrationMethodEnum getRegistrationMethod() {
        return registrationMethod;
    }

    public void setRegistrationMethod(RegistrationMethodEnum registrationMethod) {
        this.registrationMethod = registrationMethod;
    }

    public BigDecimal getRegistrationPrice() {
        return registrationPrice;
    }

    public void setRegistrationPrice(BigDecimal registrationPrice) {
        this.registrationPrice = registrationPrice;
    }

    public Integer getDraftFlag() {
        return draftFlag;
    }

    public void setDraftFlag(Integer draftFlag) {
        this.draftFlag = draftFlag;
    }

    public Integer getActivityState() {
        return activityState;
    }

    public void setActivityState(Integer activityState) {
        this.activityState = activityState;
    }

    public String getShareType() {
        return this.shareType;
    }

    public void setShareType(String shareType) {
        this.shareType = shareType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public String getActivityUrl() {
        return activityUrl;
    }

    public void setActivityUrl(String activityUrl) {
        this.activityUrl = activityUrl;
    }

    public String getShareUrl() {
        return shareUrl;
    }

    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl;
    }

    public BigDecimal getShareRate() {
        return shareRate;
    }

    public void setShareRate(BigDecimal shareRate) {
        this.shareRate = shareRate;
    }

    public Integer getRewardFlag() {
        return rewardFlag;
    }

    public void setRewardFlag(Integer rewardFlag) {
        this.rewardFlag = rewardFlag;
    }

    public ClientEnum getActivityClient() {
        return activityClient;
    }

    public void setActivityClient(ClientEnum activityClient) {
        this.activityClient = activityClient;
    }

    public Integer getRanking() {
        return ranking;
    }

    public void setRanking(Integer ranking) {
        this.ranking = ranking;
    }

    public ActivityRankingRuleEnum getRankingRule() {
        return rankingRule;
    }

    public void setRankingRule(ActivityRankingRuleEnum rankingRule) {
        this.rankingRule = rankingRule;
    }

    public ActivityRankingMethodEnum getRankingMethod() {
        return rankingMethod;
    }

    public void setRankingMethod(ActivityRankingMethodEnum rankingMethod) {
        this.rankingMethod = rankingMethod;
    }

    public Double getRankingScore() {
        return rankingScore;
    }

    public void setRankingScore(Double rankingScore) {
        this.rankingScore = rankingScore;
    }
}