项目模块初步完成
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
package ${parentPackage}.${dtoPackage};
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import ${parentPackage}.common.PageRequest;
|
||||
import com.greenorange.promotion.common.PageRequest;
|
||||
|
||||
/**
|
||||
* ${entityComment}查询请求体,继承自分页请求 PageRequest
|
||||
@ -17,6 +20,7 @@ public class ${entityName}QueryRequest extends PageRequest implements Serializab
|
||||
* ${entityComment} ID
|
||||
*/
|
||||
@Schema(description = "${entityComment} ID", example = "1")
|
||||
@Min(value = 1L, message = "${entityComment} ID不能小于1")
|
||||
private Long id;
|
||||
|
||||
#foreach($field in ${table.fields})
|
||||
@ -24,7 +28,10 @@ public class ${entityName}QueryRequest extends PageRequest implements Serializab
|
||||
/**
|
||||
* ${field.comment}
|
||||
*/
|
||||
@Schema(description = "${field.comment}", example = "${field.example}")
|
||||
#if($field.propertyType == "String")
|
||||
@NotBlank(message = "${field.comment}不能为空")
|
||||
#end
|
||||
@Schema(description = "${field.comment}", example = "")
|
||||
private ${field.propertyType} ${field.propertyName};
|
||||
|
||||
#end
|
||||
@ -33,3 +40,4 @@ public class ${entityName}QueryRequest extends PageRequest implements Serializab
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user