package com.fs.qw.domain;

import java.util.Date;
import java.util.List;

import cn.hutool.core.lang.Pair;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import com.fs.qw.vo.TransferCustomDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 客户转移审批对象 customer_transfer_approval
 *
 * @author fs
 * @date 2025-04-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CustomerTransferApproval extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 唯一主键 ID */
    private Long id;

    /** 企业 ID */
    @Excel(name = "企业 ID")
    private String corpId;
    private String companyName;

    /** 转移类型: 1=离职继承, 2=在职转接 */
    @Excel(name = "转移类型: 1=离职继承, 2=在职转接")
    private Integer transferType;
    private String transferTypeText;

    /** 客户 ID 列表 (JSON 数组字符串或逗号分隔) */
    @Excel(name = "客户 ID 列表 (JSON 数组字符串或逗号分隔)")
    private String customerIds;
    private List<TransferCustomDTO> customerList;

    /** 原负责人用户 ID (离职继承时为离职人员ID，在职转接时为转出人员ID) */
    @Excel(name = "原负责人用户 ID (离职继承时为离职人员ID，在职转接时为转出人员ID)")
    private Long originalUserId;
    private String originalUserName;

    /** 目标接收销售用户 ID */
    @Excel(name = "目标接收销售用户 ID")
    private Long targetUserId;
    private String targetUserName;

    /** 发起此转移请求的用户 ID */
    @Excel(name = "发起此转移请求的用户 ID")
    private Long initiatorUserId;
    private String initiatorUserName;

    /**
     * 转移前数据
     */
    private String transferBefore;

    /** 转移提示内容/原因 */
    @Excel(name = "转移提示内容/原因")
    private String content;

    /** 审批状态: 0=待审批, 1=审批通过, 2=审批驳回, 3=已撤销 */
    @Excel(name = "审批状态: 0=待审批, 1=审批通过, 2=审批驳回, 3=已撤销")
    private Integer approvalStatus;
    private String approvalStatusText;

    /** 审批人用户 ID */
    @Excel(name = "审批人用户 ID")
    private Long approverUserId;

    /** 审批意见/备注 */
    @Excel(name = "审批意见/备注")
    private String approvalRemark;

    /** 审批处理时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批处理时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date processedAt;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 记录最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

}
