gaoluyang
2 天以前 90b3ad820eea45d021835197eac5bc3ad55b12ed
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package cn.iocoder.yudao.module.finance.controller.admin.asset.vo;
 
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.finance.enums.FinIntangibleAssetStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDate;
 
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
 
@Schema(description = "管理后台 - 无形资产新增/修改 Request VO")
@Data
public class FinIntangibleAssetSaveReqVO {
 
    @Schema(description = "资产编号", example = "1024")
    private Long id;
 
    @Schema(description = "资产编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "WX202610120001")
    @NotEmpty(message = "资产编号不能为空")
    @Size(max = 64, message = "资产编号长度不能超过 64 个字符")
    private String assetCode;
 
    @Schema(description = "资产名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ERP 软件著作权")
    @NotEmpty(message = "资产名称不能为空")
    @Size(max = 128, message = "资产名称长度不能超过 128 个字符")
    private String assetName;
 
    @Schema(description = "资产类别", example = "软件")
    @Size(max = 64, message = "资产类别长度不能超过 64 个字符")
    private String category;
 
    @Schema(description = "证书编号", example = "软著登字第 1234567 号")
    @Size(max = 128, message = "证书编号长度不能超过 128 个字符")
    private String certificateNo;
 
    @Schema(description = "取得日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "取得日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate acquisitionDate;
 
    @Schema(description = "资产原值", requiredMode = Schema.RequiredMode.REQUIRED, example = "60000.00")
    @NotNull(message = "资产原值不能为空")
    @DecimalMin(value = "0", message = "资产原值不能小于 0")
    private BigDecimal originalValue;
 
    @Schema(description = "摊销年限(年)", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
    @NotNull(message = "摊销年限不能为空")
    @Min(value = 1, message = "摊销年限必须大于等于 1 年")
    private Integer amortizationPeriod;
 
    @Schema(description = "残值率(%)", example = "0.00")
    @DecimalMin(value = "0", message = "残值率不能小于 0")
    @DecimalMax(value = "100", message = "残值率不能大于 100")
    private BigDecimal residualRate;
 
    @Schema(description = "有效期至")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate validityDate;
 
    @Schema(description = "状态", example = "1")
    @InEnum(value = FinIntangibleAssetStatusEnum.class, message = "状态必须是 {value}")
    private Integer status;
 
    @Schema(description = "资产描述", example = "描述")
    @Size(max = 500, message = "资产描述长度不能超过 500 个字符")
    private String description;
 
    @Schema(description = "备注", example = "备注")
    @Size(max = 500, message = "备注长度不能超过 500 个字符")
    private String remark;
 
}