liu
9 小时以前 5d34bdd3c426bb2ca5f6627424ae67984f745603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package cn.iocoder.yudao.module.asset.controller.admin.item.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
 
import java.math.BigDecimal;
import java.time.LocalDate;
 
@Schema(description = "管理后台 - 资产台账新增/修改 Request VO")
@Data
public class AssetItemSaveReqVO {
 
    @Schema(description = "编号", example = "1")
    private Long id;
 
    @Schema(description = "资产编号,留空自动生成", example = "ZC20261020000001")
    private String assetNo;
 
    @Schema(description = "资产名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "激光打印机")
    @NotBlank(message = "资产名称不能为空")
    @Size(max = 128, message = "资产名称不能超过 128 个字符")
    private String name;
 
    @Schema(description = "资产分类:1-易耗品 2-办公资产 3-固定资产", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "请选择资产分类")
    private Integer category;
 
    @Schema(description = "规格型号", example = "HP M405dn")
    @Size(max = 128, message = "规格型号不能超过 128 个字符")
    private String spec;
 
    @Schema(description = "计量单位", example = "台")
    @Size(max = 16, message = "计量单位不能超过 16 个字符")
    private String unit;
 
    @Schema(description = "当前库存数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    @NotNull(message = "库存数量不能为空")
    @Min(value = 0, message = "库存数量不能小于 0")
    private Integer quantity;
 
    @Schema(description = "单价(元)", example = "1999.00")
    private BigDecimal unitPrice;
 
    @Schema(description = "购入日期", example = "2026-10-20")
    private LocalDate purchaseDate;
 
    @Schema(description = "保管人(管理人)用户 ID", example = "1024")
    private Long custodianId;
 
    @Schema(description = "保管人(管理人)姓名", example = "张三")
    @Size(max = 64, message = "保管人姓名不能超过 64 个字符")
    private String custodianName;
 
    @Schema(description = "存放地点", example = "行政楼 302")
    @Size(max = 128, message = "存放地点不能超过 128 个字符")
    private String location;
 
    @Schema(description = "备注")
    @Size(max = 512, message = "备注不能超过 512 个字符")
    private String remark;
 
}