package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 店铺打卡
 * </p>
 *
 * @author ssk
 * @since 2025-05-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="StoreClockIn对象", description="店铺打卡")
public class StoreClockIn extends Model<StoreClockIn> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "商铺id")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "'user_' + 手机号")
    @TableField("phone_id")
    private String phoneId;

    @ApiModelProperty(value = "打卡人用户分类：1-用户(life_user) 2-商户(store_user) 3-律师(lawyer_user)")
    @TableField("phone_user_type")
    private Integer phoneUserType;

    @ApiModelProperty(value = "打卡人对应表主键id（与 phone_user_type 对应）")
    @TableField("phone_ref_id")
    private Integer phoneRefId;

    @ApiModelProperty(value = "打卡内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "权限  1-所有人可见  2-仅自己可见")
    @TableField("permission")
    private Integer permission;

    @ApiModelProperty(value = "图片地址")
    @TableField("img_url")
    private String imgUrl;

    @ApiModelProperty(value = "点赞数量")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty(value = "浏览数量")
    @TableField("view_count")
    private Integer viewCount;

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

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

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

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

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

    @ApiModelProperty(value = "是否审核(未审核:0,审核中:1,审核通过:2,审核拒绝:3)")
    @TableField("check_flag")
    private Integer checkFlag;

    @ApiModelProperty(value = "AI审核结果查询id")
    @TableField("ai_task_id")
    private String aiTaskId;

    @ApiModelProperty(value = "审核失败原因")
    @TableField("reason")
    private String reason;

    @ApiModelProperty(value = "ai帮写内容（也可自己手写）")
    @TableField("maybe_ai_content")
    private String maybeAiContent;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
