3 changed files with 20 additions and 34 deletions
@ -1,37 +1,30 @@ |
|||||
// -----------------------------------------------------------------
|
|
||||
package cn.iocoder.yudao.module.system.controller.admin.config.Factory.vo; |
package cn.iocoder.yudao.module.system.controller.admin.config.Factory.vo; |
||||
|
|
||||
import io.swagger.v3.oas.annotations.media.Schema; |
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import jakarta.validation.constraints.NotBlank; |
import jakarta.validation.constraints.NotBlank; |
||||
import jakarta.validation.constraints.NotNull; |
import jakarta.validation.constraints.NotNull; |
||||
import jakarta.validation.constraints.Size; |
import jakarta.validation.constraints.Size; |
||||
|
import lombok.Data; // 新增导入
|
||||
|
|
||||
@Schema(description = "管理后台 - 电厂创建/修改 Request VO") |
@Schema(description = "管理后台 - 电厂创建/修改 Request VO") |
||||
|
@Data // << 修改点:新增注解,并移除所有手写的getter/setter
|
||||
public class FactorySaveReqVO { |
public class FactorySaveReqVO { |
||||
|
|
||||
@Schema(description = "电厂编号,更新时必填", example = "1") |
@Schema(description = "电厂编号,更新时必填", example = "1") |
||||
private Long id; // 对应 plant_id
|
private Long id; |
||||
|
|
||||
@Schema(description = "电厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "正宁电厂") |
@Schema(description = "电厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "正宁电厂") |
||||
@NotBlank(message = "电厂名称不能为空") |
@NotBlank(message = "电厂名称不能为空") |
||||
@Size(max = 255) |
@Size(max = 255) |
||||
private String name; // 对应 plant_name
|
private String name; |
||||
|
|
||||
@Schema(description = "电厂简称", example = "正宁") |
@Schema(description = "电厂简称", example = "正宁") |
||||
@Size(max = 50) |
@Size(max = 50) |
||||
private String shortName; // 对应 plant_shortname
|
private String shortName; |
||||
|
|
||||
@Schema(description = "所属集团编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9") |
@Schema(description = "所属集团编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9") |
||||
@NotNull(message = "所属集团不能为空") |
@NotNull(message = "所属集团不能为空") |
||||
private Long areaId; // 对应 area_id
|
private Long areaId; |
||||
|
|
||||
// --- Getter 和 Setter 方法 ---
|
// --- 此处所有手写的 Getter 和 Setter 方法均已删除 ---
|
||||
public Long getId() { return id; } |
} |
||||
public void setId(Long id) { this.id = id; } |
|
||||
public String getName() { return name; } |
|
||||
public void setName(String name) { this.name = name; } |
|
||||
public String getShortName() { return shortName; } |
|
||||
public void setShortName(String shortName) { this.shortName = shortName; } |
|
||||
public Long getAreaId() { return areaId; } |
|
||||
public void setAreaId(Long areaId) { this.areaId = areaId; } |
|
||||
} |
|
Loading…
Reference in new issue