package cn.iocoder.yudao.module.bpm.controller.admin.oa.universal.vo;

import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 通用事项审批流程信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class OaUniversalRespVO {

    @Schema(description = "自增主键")
    @ExcelProperty("自增主键")
    private Long id;

    @Schema(description = "uuid")
    @ExcelProperty("uuid")
    private String universalId;

    @Schema(description = "申请人id")
    @ExcelProperty("申请人id")
    private Long employeeId;

    @Schema(description = "申请人uuid")
    @ExcelProperty("申请人uuid")
    private String employeeUuid;

    @Schema(description = "申请员工姓名")
    @ExcelProperty("申请员工姓名")
    private String employeeName;

    @Schema(description = "申请员工手机号")
    private String employeePhone;

    @Schema(description = "申请用户账号id")
    @ExcelProperty("申请用户账号id")
    private Long userId;

    @Schema(description = "申请用户账号手机号")
    private String userPhone;

    @Schema(description = "部门id")
    @ExcelProperty("部门id")
    private Long deptId;

    @Schema(description = "部门名称")
    @ExcelProperty("部门名称")
    private String deptName;

    @Schema(description = "职位id")
    @ExcelProperty("职位id")
    private Long postId;

    @Schema(description = "职位")
    @ExcelProperty("职位")
    private String position;

    @Schema(description = "申请事项标题")
    @ExcelProperty("申请事项标题")
    private String title;

    @Schema(description = "详细描述")
    @ExcelProperty("详细描述")
    private String description;

    @Schema(description = "备注")
    @ExcelProperty("备注")
    private String remarks;

    @Schema(description = "流程实例id")
    @ExcelProperty("流程实例id")
    private String procInstId;

    @Schema(description = "审核状态（0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回）")
    @ExcelProperty("审核状态（0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回）")
    private String auditStatus;

    @Schema(description = "当前审核人用户id")
    @ExcelProperty("当前审核人用户id")
    private Long currentAuditUserId;

    @Schema(description = "当前审核人员工id")
    @ExcelProperty("当前审核人员工id")
    private Long currentAuditEmployeeId;

    @Schema(description = "当前审核人员工姓名")
    @ExcelProperty("当前审核人员工姓名")
    private String currentAuditEmployeeName;

    @Schema(description = "最后审核时间")
    @ExcelProperty("最后审核时间")
    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime finalAuditDate;

    @Schema(description = "数据来源，0流程添加、1手动添加")
    @ExcelProperty("数据来源，0流程添加、1手动添加")
    private String infoSource;

    @Schema(description = "创建者")
    @ExcelProperty("创建者")
    private String creator;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "附件列表")
    private List<FileDTO> fileList;

    @Schema(description = "附件id列表")
    private List<Long> fileIdList;
    @Schema(description = "审批记录列表")
    private List<BpmTaskRespVO> auditRecordList;

    @Schema(description = "审批人员列表")
    private List<EmployeeRespDTO> auditUserList;

    @Schema(description = "当前用户待处理的任务id")
    private String taskId;

}