package com.qs.mp.admin.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qs.mp.common.enums.TicketPrizeTypeEnum;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @describe 盲票盒奖项对应的奖品设置实体类
 * @auther quanshu
 * @create 2022-03-02 12:25:55
 */
@TableName("mp_ticket_awards_prize")
@Data
@ApiModel("盲票盒奖项对应的奖品设置实体类")
public class TicketAwardsPrize implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 主键
   */
  @ApiModelProperty("奖品id,主键")
  @TableId(value = "prize_id" , type = IdType.INPUT)
  private String prizeId;

  /**
   * 盲票组ID
   */
  @ApiModelProperty("盲票组ID")
  @TableField("box_id")
  private String boxId;

  /**
   * 奖项ID
   */
  @ApiModelProperty("奖项ID")
  @TableField("awards_id")
  private String awardsId;

  /**
   * 奖品ID（GOODS_ID或COUPON_ID)
   */
  @ApiModelProperty("奖品ID（GOODS_ID或COUPON_ID)")
  @TableField("ref_id")
  private String refId;

  /**
   * 奖品名称
   */
  @ApiModelProperty("奖品名称")
  @TableField("title")
  private String title;

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

  /**
   * 奖品类型 1 实物商品 2优惠券 3平台代币
   */
  @ApiModelProperty("奖品类型 1 实物商品 2优惠券 3平台代币")
  @TableField("prize_type")
  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
  private TicketPrizeTypeEnum prizeType;

  /**
   * 奖品数
   */
  @ApiModelProperty("奖品数")
  @TableField("quantity")
  private Integer quantity;

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

  /**
   * 剩余奖品数
   */
  @ApiModelProperty("剩余奖品数")
  @TableField("remain_qty")
  private Integer remainQty;

  /**
   * 奖品价值
   */
  @ApiModelProperty("奖品价值")
  @TableField("value")
  private Integer value;

  @ApiModelProperty("排序权重，越大越靠前")
  @TableField("sort_weight")
  private Integer sortWeight;

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

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

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


  /**
   * 商品成本
   */
  @ApiModelProperty("商品成本")
  @TableField(exist = false)
  private Integer cost;

}
