/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.seckill.comment.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 秒杀信息
 *
 * @author LGH
 * @date 2019-08-28 09:36:59
 */
@Data
@TableName("tz_seckill")
public class Seckill implements Serializable{
    private static final long serialVersionUID = 1L;

    /**
     * 秒杀活动id
     */
    @TableId
    @ApiModelProperty(value = "秒杀活动id", required = true)
    private Long seckillId;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id", required = true)
    private Long prodId;
    /**
     * 活动名称
     */
    @NotNull
    @ApiModelProperty(value = "活动名称", required = true)
    private String seckillName;
    /**
     * 开始时间
     */
    @NotNull
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间", required = true)
    private Date startTime;
    /**
     * 结束时间
     */
    @NotNull
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间", required = true)
    private Date endTime;
    /**
     * 活动标签
     */
    @ApiModelProperty(value = "活动标签", required = true)
    private String seckillTag;
    /**
     * 限购数量
     */
    @ApiModelProperty(value = "限购数量", required = true)
    private Integer maxNum;
    /**
     * 取消订单时间
     */
    @ApiModelProperty(value = "取消订单时间", required = true)
    private Integer maxCancelTime;

    /**
     * 店铺id
     */
    @ApiModelProperty(value = "店铺id", required = true)
    private Long shopId;

    /**
     * 是否已删除 0 未删除 1已删除
     */
    @ApiModelProperty(value = "是否已删除 0 未删除 1已删除", required = true)
    private Integer isDelete;


    /**
     * 状态：0 失效 1正常
     */
    @ApiModelProperty(value = "状态：0 失效 1正常", required = true)
    private Integer status;

    /**
     * 秒杀活动剩余库存
     */
    @ApiModelProperty(value = "秒杀活动剩余库存", required = true)
    private Integer seckillTotalStocks;

    /**
     * 秒杀活动原始库存
     */
    @ApiModelProperty(value = "秒杀活动原始库存", required = true)
    private Integer seckillOriginStocks;

    /**
     * 秒杀活动最低价
     */
    @ApiModelProperty(value = "秒杀活动最低价", required = true)
    private Double seckillPrice;

    /**
     * 店铺名称
     */
    @TableField(exist = false)
    private String shopName;
}
