package com.qs.mp.user.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.UserRedPkgStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @describe 用户的红包实体类
 * @auther quanshu
 * @create 2023-06-12 15:03:20
 */
@ApiModel("用户的红包实体类")
@TableName("mp_user_red_pkg")
@Data
public class UserRedPkg implements Serializable {
    private static final long serialVersionUID = 1L;

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

    /**
     * 用户ID
     */
    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Long userId;

    /**
     * 入库关联业务id
     */
    @ApiModelProperty("入库关联业务id")
    @TableField("ref_id")
    private String refId;

    /**
     * 标题
     */
    @ApiModelProperty("标题")
    @TableField("title")
    private String title;

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

    /**
     * 金额
     */
    @ApiModelProperty("金额")
    @TableField("value")
    private Integer value;

    /**
     * 领取时间
     */
    @TableField("draw_time")
    @ApiModelProperty("领取时间")
    private Date drawTime;

    /**
     * 状态;0未领取 1已领取
     */
    @ApiModelProperty("0未领取 1已领取")
    @TableField("status")
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private UserRedPkgStatusEnum status;

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

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


}