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.yonge.cooleshow.biz.dal.enums.InOrOutEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * 活动奖品库存调整记录表
 */
@TableName("activity_reward_change_stock")
@ApiModel(value = "ActivityRewardChangeStock对象", description = "活动奖品库存调整记录表")
public class ActivityRewardChangeStock implements Serializable {
	private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键 ")
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("奖品id ")
	@TableField(value = "reward_id_")
    @NotNull(message = "奖品id不能为空")
    private Long rewardId;
    @ApiModelProperty("调整库存数 ")
	@TableField(value = "stock_")
    @NotNull(message = "调整库存数不能为空")
    @Positive(message = "调整库存数必须大于0")
    private Integer stock;
    @ApiModelProperty("调整类型： IN 增加 OUT 减少 ")
	@TableField(value = "change_type_")
    @NotNull(message = "调整类型不能为空")
    private InOrOutEnum changeType;
    @ApiModelProperty("变更来源：ADMIN 后台调整 ACTIVITY 活动分配 ")
    @TableField(value = "source_")
    private String source;
    @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;

	public Long getId() {
        return id;
    }

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

    public void setRewardId(Long rewardId) {
        this.rewardId = rewardId;
    }
    
	public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }
    
	public InOrOutEnum getChangeType() {
        return changeType;
    }

    public void setChangeType(InOrOutEnum changeType) {
        this.changeType = changeType;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    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;
    }
    
}