package shop.alien.entity.second;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户积分日期记录表
 */
@Data
@JsonInclude
@TableName("second_user_credit_date_record")
public class SecondUserCreditDateRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    @TableField("record_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "记录日期")
    private Date recordDate;

    @TableField("total_points")
    @ApiModelProperty(value = "当日总积分")
    private Integer totalPoints;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人ID")
    private Integer createdUserId;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "修改时间")
    private Date updatedTime;

    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改人ID")
    private Integer updatedUserId;
}

