package shop.alien.entity.store;

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.util.Date;

/**
 * 收藏
 */
@Data
@JsonInclude
@TableName("life_collect")
public class LifeCollect {

    @TableId(type = IdType.AUTO)
    private String id;

    private String storeId;

    @ApiModelProperty(value = "收藏人身份键（user_{phone} 或历史数字 userId 字符串）")
    private String userId;

    @TableField("user_id_user_type")
    @ApiModelProperty(value = "收藏人用户分类：1-用户(life_user) 2-商户(store_user) 3-律师(lawyer_user)")
    private Integer userIdUserType;

    @TableField("user_id_ref_id")
    @ApiModelProperty(value = "收藏人对应表主键id（与 user_id_user_type 对应）")
    private Integer userIdRefId;

    @ApiModelProperty(value = "团购id")
    @TableField("coupon_id")
    private String couponId;

    private String businessId;

    private String businessType;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

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

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

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

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "优惠券发放标记：0-未发放，1-已发放")
    @TableField("coupon_issued_flag")
    private Integer couponIssuedFlag;
}
