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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;
import java.util.Date;

/**
 * 活动计划奖品表
 */
@TableName("activity_plan_reward")
@ApiModel(value = "ActivityPlanReward对象", description = "活动计划奖品表")
public class ActivityPlanReward implements Serializable {
	private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键 ")
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("活动id ")
	@TableField(value = "activity_id_")
    @NotNull(message = "活动id不能为空")
    private Long activityId;
    @ApiModelProperty("奖品id ")
	@TableField(value = "reward_id_")
    @NotNull(message = "奖品id不能为空")
    private Long rewardId;
    @ApiModelProperty("奖品数量 ")
	@TableField(value = "reward_num_")
    @NotNull(message = "奖品数量不能为空")
    @PositiveOrZero(message = "奖品数量必须大于等于0")
    private Integer rewardNum;

    @ApiModelProperty("奖品库存 ")
    @TableField(value = "reward_stock_")
    private Integer rewardStock;

    @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 = "group_")
    private String group;

    public Integer getRewardStock() {
        return rewardStock;
    }

    public void setRewardStock(Integer rewardStock) {
        this.rewardStock = rewardStock;
    }

    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 Long getRewardId() {
        return rewardId;
    }

    public void setRewardId(Long rewardId) {
        this.rewardId = rewardId;
    }
    
	public Integer getRewardNum() {
        return rewardNum;
    }

    public void setRewardNum(Integer rewardNum) {
        this.rewardNum = rewardNum;
    }
    
	public Date getCreateTime() {
        return createTime;
    }

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

    public String getGroup() {
        return group;
    }

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


    public ActivityPlanReward rewardStock(Integer rewardStock) {
        this.rewardStock = rewardStock;
        return this;
    }
}