package shop.alien.entity.store;

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

import java.util.Date;

/**
 * 用户搜索历史
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("lawyer_user_search_history")
@ApiModel(value = "LawyerUserSearchHistory对象", description = "用户搜索历史")
public class LawyerUserSearchHistory extends Model<LawyerUserSearchHistory> {

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

    @ApiModelProperty(value = "用户ID")
    @TableField("client_user_id")
    private Integer clientUserId;

    @ApiModelProperty(value = "搜索关键词")
    @TableField("search_keyword")
    private String searchKeyword;

    @ApiModelProperty(value = "搜索类型, 0:律师姓名, 1:法律问题, 2:律所名称")
    @TableField("search_type")
    private Integer searchType;

    @ApiModelProperty(value = "搜索时间")
    @TableField("search_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date searchTime;

    @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;
}

