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.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;
import com.qs.mp.common.enums.CdKeyGroupGoodsTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

    /**
     * 主键
     */
    @ApiModelProperty("主键")
    @TableId(value = "key_id", type = IdType.AUTO)
    private Long keyId;

    /**
     * 兑换码组id
     */
    @ApiModelProperty("兑换码组id")
    @TableField("group_id")
    private String groupId;

    /**
     * 关联商品id
     */
    @ApiModelProperty("关联商品id")
    @TableField("ref_id")
    private String refId;

    @ApiModelProperty("商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty("商品价值")
    @TableField("value")
    private Integer value;

    /**
     * 商品类型 goods 实物商品 coupon优惠券 coin平台代币 coupon_pkg券包
     */
    @ApiModelProperty("商品类型 goods 实物商品 coupon优惠券 coin平台代币 coupon_pkg券包")
    @TableField("type")
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private CdKeyGroupGoodsTypeEnum type;

    /**
     * 商品图片
     */
    @ApiModelProperty("商品图片")
    @TableField("pic_url")
    private String picUrl;

    /**
     * 兑换码状态 0未兑,1已兑
     */
    @ApiModelProperty("兑换码状态 0未兑,1已兑")
    @TableField("status")
    private Integer status;

    /**
     * 兑换码
     */
    @ApiModelProperty("兑换码")
    @TableField("cd_key")
    private String cdKey;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private Date createTime;


}