package com.zt.plat.module.qms.resource.record.controller.admin.recordrecord.vo;

import com.zt.plat.module.qms.resource.clientManage.controller.vo.UploadFileVo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

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

@Schema(description = "管理后台 - 文件、模板、记录新增/修改 Request VO")
@Data
public class RecordRecordSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4317")
    private Long id;

    @Schema(description = "分类id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7849")
    @NotNull(message = "分类id不能为空")
    private Long categoryId;

    @Schema(description = "文件编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "文件编号不能为空")
    private String code;

    @Schema(description = "业务类型")
    private String businessType;

    @Schema(description = "表单key")
    private String formKey;

    @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotEmpty(message = "文件名称不能为空")
    private String name;

    @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "版本不能为空")
    private String version;

    @Schema(description = "是否最新版本,默认显示最新版本", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer currentFlag;

    @Schema(description = "编制日期")
    private LocalDateTime makeDate;

    @Schema(description = "是否涉密", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否涉密不能为空")
    private Integer confidentialFlag;

    @Schema(description = "密级")
    private String confidentialLevel;

    @Schema(description = "加密方式")
    private String confidentialWay;

    @Schema(description = "秘钥")
    private String confidentialKey;

    @Schema(description = "是否长期有效", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer permanently;

    @Schema(description = "是否需要提交(用来判断文件是否需要走流程)")
    private Integer submitFlag;

    @Schema(description = "文件记录状态,0: 无效，1: 有效")
    private Integer recordStatus;

    @Schema(description = "过期日期")
    private LocalDateTime expirationDate;

    @Schema(description = "生效日期")
    private LocalDateTime effectiveDate;

    @Schema(description = "过期标识,0-有效，1-过期", example = "1")
    private Integer expirationStatus;

    @Schema(description = "作废标志,0-有效，1-作废")
    private Integer cancelFlag;

    @Schema(description = "审批状态,需要走流程的审批状态")
    private String applyStatus;

    @Schema(description = "流程实例Id")
    private String flowInstanceId;

    @Schema(description = "表单数据")
    private String formData;

    @Schema(description = "数据集配置ID", example = "23466")
    private Long dataCollectionId;

    @Schema(description = "源文件链接", example = "https://www.iocoder.cn")
    private String sourceUrl;

    @Schema(description = "所属部门")
    private String systemDepartmentCode;

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

    @Schema(description = "是否回收权限")
    private Integer collectionFlag;

    @Schema(description = "原始父级ID")
    private Long mainId;

    @Schema(description = "是否可编辑")
    private Integer operationFlag;

    //    =================临时字段==================>
    @Schema(description = "是否新版本")
    private String newVersion;

    @Schema(description = "上传文件列表")
    private List<UploadFileVo> files;

    @Schema(description = "删除的文件id")
    private List<Long> deleteFileIdList;
}