package com.qs.mp.admin.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.qs.mp.common.enums.CdKeyGroupStatusEnum;
import com.qs.mp.common.enums.ValidityPeriodEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @describe 兑换码组实体类
 * @auther quanshu
 * @create 2023-05-16 17:19:30
 */
@ApiModel("兑换码组表")
@TableName("mp_cd_key_group")
@Data
public class CdKeyGroup implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty("兑换码组id")
    @TableId(value = "group_id", type = IdType.INPUT)
    private String groupId;

    /**
     * 渠道id
     */
    @ApiModelProperty("渠道id")
    @TableField("channel_id")
    private Long channelId;

    /**
     * 门店名称
     */
    @ApiModelProperty("门店名称")
    @TableField("site_name")
    private String siteName;

    /**
     * 兑换码组标题
     */
    @ApiModelProperty("兑换码组标题")
    @TableField("title")
    private String title;

    /**
     * 兑换码数量
     */
    @ApiModelProperty("兑换码数量")
    @TableField("quantity")
    private Integer quantity;

    /**
     * 已兑数量
     */
    @ApiModelProperty("已兑数量")
    @TableField("cashed_qty")
    private Integer cashedQty;

    /**
     * 未兑数量
     */
    @ApiModelProperty("未兑数量")
    @TableField("remain_qty")
    private Integer remainQty;

    /**
     * 状态,未激活noactive/已生效activated/已失效invalid
     */
    @ApiModelProperty("状态,待生成waiting/未激活noactive/已生效activated/已失效invalid")
    @TableField("status")
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private CdKeyGroupStatusEnum status;

    /**
     * 有效期,三个月threeMonths/六个月sixMonths/forever永久
     */
    @ApiModelProperty("有效期,三个月threeMonths/六个月sixMonths/永久forever")
    @TableField("validity_period")
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private ValidityPeriodEnum validityPeriod;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @TableField("created_time")
    private Date createdTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @TableField("updated_time")
    private Date updatedTime;

    /**
     * 激活时间
     */
    @ApiModelProperty("激活时间")
    @TableField("activation_time")
    private Date activationTime;

    /**
     * 逻辑删除标识
     */
    @ApiModelProperty("逻辑删除标记")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;


}