package com.zt.plat.module.qms.resource.record.controller.admin.recordapply.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 static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 文件评审分页 Request VO")
@Data
public class RecordApplyJoinPageVO {

    // ============recordApply=================>

    @Schema(description = "id", example = "28812")
    private Long id;

    @Schema(description = "申请标题,【字典】【jy_record_apply_bsn_type】分发、查看申请、作废、评审")
    private String title;

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

    @Dict(dicCode = "flow_status")
    private String businessStatus;

    @Schema(description = "申请人id", example = "15000")
    private Long applyUserId;

    @Schema(description = "申请人姓名", example = "张三")
    private String applyUserName;

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

    @Schema(description = "部门名称", example = "研发部")
    private String applyDepartmentName;

    @Schema(description = "评审范围")
    private String reviewRange;

    @Schema(description = "参加评审人员", example = "赵六")
    private String reviewUserName;

    @Schema(description = "参加评审人员id")
    private String targetUserIds;

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

    @Schema(description = "申请事由")
    private String applyContent;

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

    @Schema(description = "开始日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime applyStartDate;

    @Schema(description = "截止日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime applyEndDate;

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

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

    // ============recordApplyDetail=================>
    @Schema(description = "applyDetailId", example = "28812")
    private Long applyDetailId;

    @Schema(description = "父id", example = "28812")
    private Long applyId;

    @Schema(description = "文件id", example = "3188")
    private Long documentId;

    @Schema(description = "授权类型")
    private String TargetType;

    @Schema(description = "授权Id")
    private Long targetId;

    // ============recordRecord=================>

    @Schema(description = "记录id", example = "7849")
    private Long recordId;

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

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

    @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 permanently;

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

    @Schema(description = "文件记录状态,0: 无效，1: 有效")
    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 Integer expirationStatus;

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

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


}