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

import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
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;

import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 文件、模板、记录分页 Request VO")
@Data
public class RecordRecordPageReqVO extends PageParam {

    @Schema(description = "分类id", example = "7849")
    private Long categoryId;

    @Schema(description = "文件编号")
    private String code;

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

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

    @Schema(description = "文件名称", example = "王五")
    private String name;

    @Schema(description = "版本")
    private String version;

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

    @Schema(description = "编制日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] makeDate;

    @Schema(description = "是否涉密")
    private Integer confidentialFlag;

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

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

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

    @Schema(description = "是否长期有效")
    private String permanently;

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

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

    @Schema(description = "过期日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] expirationDate;

    @Schema(description = "生效日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] effectiveDate;

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

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

    @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 = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

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

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

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

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

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

//    ===========临时字段==========
    @Schema(description = "是否查询历史数据")
    private Integer isQueryHistory; // 1-查询，0-不查询

    private String appraisalFlag;

    // ===========扩展字段==========
    private List<Long> categoryIds;

}