package org.hzhub.crm.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.util.Date;

/**
 * CRM同步预警对象 crm_sync_alert
 *
 * @author hzhub
 */
@Data
@TableName("crm_sync_alert")
public class CrmSyncAlert {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 租户编号
     */
    private String tenantId;

    /**
     * 关联同步日志ID
     */
    private Long syncLogId;

    /**
     * 经销商ID
     */
    private Long dealerId;

    /**
     * ERP客户编码
     */
    private String customerCode;

    /**
     * 预警类型: CONTACT_DIFF联系人差异/ADDRESS_DIFF地址详情差异/STATUS_DIFF状态差异
     */
    private String alertType;

    /**
     * CRM当前值(JSON格式)
     */
    private String crmValue;

    /**
     * ERP当前值(JSON格式)
     */
    private String erpValue;

    /**
     * 预警描述
     */
    private String alertMessage;

    /**
     * 处理状态: PENDING待处理/ACKNOWLEDGED已确认/RESOLVED已处理/IGNORED已忽略
     */
    private String status;

    /**
     * 处理人ID
     */
    private Long resolvedBy;

    /**
     * 处理时间
     */
    private Date resolvedTime;

    /**
     * 处理备注
     */
    private String resolvedNote;

    /**
     * 创建时间
     */
    private Date createTime;
}