package cn.iocoder.yudao.module.asset.controller.admin.assetinfo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "管理后台 - 固定资产信息新增/修改 Request VO")
@Data
public class AssetInfoSaveReqVO {

    @Schema(description = "资产信息主键自增id", example = "1")
    private Long id;

    @Schema(description = "资产名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "资产名称不能为空")
    @NotBlank(message = "资产名称不能为空")
    private String name;

    @Schema(description = "资产型号", example = "资产型号可以为空")
    private String typeNumber;

    @Schema(description = "资产序列号", example = "资产序列号可以为空")
    private String serialNumber;

    @Schema(description = "购买日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-08-08")
    @NotBlank(message = "购买日期不能为空")
    private String purchaseDate;

    @Schema(description = "资产化日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-08-09")
    @NotBlank(message = "资产化日期不能为空")
    private String capitalizationDate;

    @Schema(description = "折旧年限(大于0的自然数)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "折旧年限不能为空")
    @Min(value = 1, message = "折旧年限必须大于0")
    private Integer depreciationYear;

    @Schema(description = "资产归属部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "103")
    @NotNull(message = "资产归属部门不能为空")
    private Long assetDeptId;

    @Schema(description = "资产归属地", example = "资产归属地可以为空")
    private String assetPlace;

    @Schema(description = "资产管理负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "资产管理负责人不能为空")
    private Long assetManagerEmployeeId;

    @Schema(description = "备注", example = "备注可以为空")
    private String remarks;

    @Schema(description = "附件主键id", example = "[]")
    private List<Long> fileIdList;

}