package shop.alien.entity.second;

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.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

@Data
@JsonInclude
@TableName("second_risk_control_record")
public class SecondRiskControlRecord extends Model<SecondRiskControlRecord> {
    private static final long serialVersionUID = 1L;

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

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

    @TableField("rule_type")
    @ApiModelProperty(value = "规则类型 1:洗钱嫌疑 2:账号异常 3:交易欺诈 4:异常发布")
    private Integer ruleType;

    @TableField("rule_name")
    @ApiModelProperty(value = "规则名称")
    private String ruleName;

    @TableField("risk_status")
    @ApiModelProperty(value = "风控执行状态 0 未执行，1-已执行 2-已忽略")
    private Integer riskStatus;

//
//    @TableField("trigger_count")
//    @ApiModelProperty(value = "触发次数")
//    private Integer triggerCount;
//
//    @TableField("time_window_hours")
//    @ApiModelProperty(value = "时间窗口（小时）")
//    private Integer timeWindowHours;
//
//    @TableField("threshold_value")
//    @ApiModelProperty(value = "阈值")
//    private Integer thresholdValue;
//
//    @TableField("actual_value")
//    @ApiModelProperty(value = "实际值")
//    private Integer actualValue;

    @TableField("business_id")
    @ApiModelProperty(value = "业务ID（如商品ID、交易ID等）")
    private String businessId;

//    @TableField("business_type")
//    @ApiModelProperty(value = "业务类型 1:二手商品 2:交易记录")
//    private Integer businessType;

    @TableField("detail_info")
    @ApiModelProperty(value = "详细信息（JSON格式）")
    private String detailInfo;

    @TableField("delete_flag")
    @ApiModelProperty(value = "删除标记 0:未删除 1:已删除")
    @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;
}