package com.zt.plat.module.qms.resource.clientManage.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import jakarta.validation.constraints.*;

import java.util.List;

@Schema(description = "管理后台 - 客户端版本管理新增/修改 Request VO")
@Data
public class VersionManagementSaveReqVO {

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

    @Schema(description = "客户端code", requiredMode = Schema.RequiredMode.REQUIRED, example = "20524")
    @NotEmpty(message = "客户端名称不能为空")
    private String applicationCode;

    @Schema(description = "客户端名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "客户端名称不能为空")
    private String applicationName;

    @Schema(description = "更新标题")
    private String updateTitle;

    @Schema(description = "更新内容")
    private String updateContent;

    @Schema(description = "更新平台", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotEmpty(message = "更新平台不能为空")
    private String updatePlatform;

    @Schema(description = "安装包类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
//    @NotEmpty(message = "安装包类型不能为空")
    private String updateType;

    @Schema(description = "当前版本，必须大于当前线上发行版本号")
    private String currentVersion;

    @Schema(description = "最低版本")
    private String minimumVersion;

    @Schema(description = "下载地址", example = "https://www.iocoder.cn")
    private String downloadUrl;

    @Schema(description = "文件md5值")
    private String fileMd5;

    @Schema(description = "文件sha1值")
    private String fileEncryptAlgorithm;

    @Schema(description = "发布状态", requiredMode = Schema.RequiredMode.REQUIRED)
    private String publishFlag;

    @Schema(description = "是否静默更新")
    private Integer silenceFlag;

    @Schema(description = "是否强制更新")
    private Integer mustFlag;

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

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

    @Schema(description = "上传文件Uid")
    private String downloadId;

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

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

}