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.common.enums.RewardTypeEnum;
import com.yonge.cooleshow.common.enums.UnitEnum;
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 javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 活动奖品表
 */
@TableName("activity_reward")
@ApiModel(value = "ActivityReward对象", description = "活动奖品表")
public class ActivityReward implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键 ")
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("活动id(评测活动冗余) ")
    @TableField(value = "activity_id_")
    private Long activityId;
    @ApiModelProperty("客户端：STUDENT 学生端 TEACHER 老师端  多选 ")
    @TableField(value = "reward_client_")
    @NotBlank(message = "客户端不能为空")
    private String rewardClient;
    @ApiModelProperty("奖品名称 ")
    @TableField(value = "reward_name_")
    @NotBlank(message = "奖品名称不能为空")
    private String rewardName;
    @ApiModelProperty("奖品类型:  ACTUAL 实物 VIP 小酷AI会员 PIAMO_ROOM 琴房时长 COUPON(优惠券)")
    @TableField(value = "reward_type_")
    @NotNull(message = "奖品类型不能为空")
    private RewardTypeEnum rewardType;

    @ApiModelProperty("奖品描述 ")
    @TableField(value = "reward_describe_")
    private String rewardDescribe;
    @ApiModelProperty("奖品图片 ")
    @TableField(value = "img_url_")
    @NotBlank(message = "奖品图片不能为空")
    private String imgUrl;
    @ApiModelProperty("库存数 ")
    @TableField(value = "stock_")
    @NotNull(message = "库存数不能为空")
    @PositiveOrZero(message = "库存数必须大于等于0")
    private Integer stock;
    @ApiModelProperty("数量（每个奖品） ")
    @TableField(value = "num_")
    private Integer num;
    @ApiModelProperty("单位 DAY 天 MONTH 月 YEAR 年")
    @TableField(value = "unit_")
    private UnitEnum unit;
    @ApiModelProperty("状态 0 正常 1停用 ")
    @TableField(value = "status_")
    private Integer status;
    @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 = "discount_price_")
    private BigDecimal discountPrice;

    @ApiModelProperty("优惠券ID")
    @TableField(value = "coupon_id_")
    private Long couponId;

    @ApiModelProperty(value = "奖品分组 ", hidden = true)
    @TableField(exist = false)
    private String group;

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public Long getId() {
        return id;
    }

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

    public Long getActivityId() {
        return activityId;
    }

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

    public String getRewardClient() {
        return rewardClient;
    }

    public void setRewardClient(String rewardClient) {
        this.rewardClient = rewardClient;
    }

    public String getRewardName() {
        return rewardName;
    }

    public void setRewardName(String rewardName) {
        this.rewardName = rewardName;
    }

    public RewardTypeEnum getRewardType() {
        return rewardType;
    }

    public void setRewardType(RewardTypeEnum rewardType) {
        this.rewardType = rewardType;
    }

    public String getRewardDescribe() {
        return rewardDescribe;
    }

    public void setRewardDescribe(String rewardDescribe) {
        this.rewardDescribe = rewardDescribe;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public UnitEnum getUnit() {
        return unit;
    }

    public void setUnit(UnitEnum unit) {
        this.unit = unit;
    }

    public Integer getStatus() {
        return status;
    }

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

    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 getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }
}