package org.xyzh.api.workcase.vo;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.Date;
import java.util.List;

/**
 * 工单VO
 * 用于前端展示工单信息
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "工单VO")
public class TicketVO extends BaseVO {
    private static final long serialVersionUID = 1L;
    
    @Schema(description = "工单ID")
    private String ticketId;
    
    @Schema(description = "工单编号")
    private String ticketNo;
    
    @Schema(description = "客户ID")
    private String customerId;
    
    @Schema(description = "客户姓名")
    private String customerName;
    
    @Schema(description = "客户电话")
    private String customerPhone;
    
    @Schema(description = "关联会话ID")
    private String conversationId;
    
    @Schema(description = "工单类型")
    private String ticketType;
    
    @Schema(description = "工单类型名称")
    private String ticketTypeName;
    
    @Schema(description = "工单分类")
    private String ticketCategory;
    
    @Schema(description = "优先级")
    private String priority;
    
    @Schema(description = "优先级名称")
    private String priorityName;
    
    @Schema(description = "优先级颜色")
    private String priorityColor;
    
    @Schema(description = "工单标题")
    private String title;
    
    @Schema(description = "问题描述")
    private String description;
    
    @Schema(description = "附件ID数组")
    private List<String> attachments;
    
    @Schema(description = "附件数量")
    private Integer attachmentCount;
    
    @Schema(description = "工单来源")
    private String ticketSource;
    
    @Schema(description = "工单来源名称")
    private String ticketSourceName;
    
    @Schema(description = "分配给（处理人ID）")
    private String assignedTo;
    
    @Schema(description = "处理人姓名")
    private String assignedToName;
    
    @Schema(description = "分配部门")
    private String assignedDept;
    
    @Schema(description = "分配部门名称")
    private String assignedDeptName;
    
    @Schema(description = "工单状态")
    private String ticketStatus;
    
    @Schema(description = "工单状态名称")
    private String ticketStatusName;
    
    @Schema(description = "工单状态颜色")
    private String statusColor;
    
    @Schema(description = "解决方案")
    private String resolution;
    
    @Schema(description = "解决时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date resolutionTime;
    
    @Schema(description = "关闭时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date closeTime;
    
    @Schema(description = "首次响应时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date responseTime;
    
    @Schema(description = "SLA截止时间", format = "date-time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date slaDeadline;
    
    @Schema(description = "是否逾期", defaultValue = "false")
    private Boolean isOverdue;
    
    @Schema(description = "距离SLA截止的剩余时间（分钟）")
    private Integer slaRemainingMinutes;
    
    @Schema(description = "客户评分（1-5星）")
    private Integer customerRating;
    
    @Schema(description = "客户反馈")
    private String customerFeedback;
    
    @Schema(description = "CRM系统工单ID")
    private String crmTicketId;
    
    @Schema(description = "同步状态")
    private String syncStatus;
    
    @Schema(description = "同步状态名称")
    private String syncStatusName;
    
    @Schema(description = "工单标签")
    private List<String> tags;
    
    @Schema(description = "工单元数据")
    private JsonNode metadata;
    
    @Schema(description = "处理记录数量")
    private Integer logCount;
    
    @Schema(description = "创建者姓名")
    private String creatorName;
    
    @Schema(description = "更新者姓名")
    private String updaterName;
}
