Files
qingcheng-houduan/src/main/resources/templates/dto/QueryRequest.java.vm

44 lines
1.3 KiB
Plaintext
Raw Normal View History

2025-04-01 11:48:31 +08:00
package ${parentPackage}.${dtoPackage};
import io.swagger.v3.oas.annotations.media.Schema;
2025-05-06 16:38:42 +08:00
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
2025-04-01 11:48:31 +08:00
import lombok.Data;
2025-05-06 16:38:42 +08:00
2025-04-01 11:48:31 +08:00
import java.io.Serial;
import java.io.Serializable;
2025-05-06 16:38:42 +08:00
import com.greenorange.promotion.common.PageRequest;
2025-04-01 11:48:31 +08:00
/**
* ${entityComment}查询请求体,继承自分页请求 PageRequest
*/
@Data
@Schema(description = "${entityComment}查询请求体", requiredProperties = {"current", "pageSize"})
public class ${entityName}QueryRequest extends PageRequest implements Serializable {
/**
* ${entityComment} ID
*/
@Schema(description = "${entityComment} ID", example = "1")
2025-05-06 16:38:42 +08:00
@Min(value = 1L, message = "${entityComment} ID不能小于1")
2025-04-01 11:48:31 +08:00
private Long id;
#foreach($field in ${table.fields})
#if(!$field.keyFlag && $field.propertyName != "createTime" && $field.propertyName != "updateTime" && $field.propertyName != "isDelete")
/**
* ${field.comment}
*/
2025-05-06 16:38:42 +08:00
#if($field.propertyType == "String")
@NotBlank(message = "${field.comment}不能为空")
#end
@Schema(description = "${field.comment}", example = "")
2025-04-01 11:48:31 +08:00
private ${field.propertyType} ${field.propertyName};
#end
#end
@Serial
private static final long serialVersionUID = 1L;
}
2025-05-06 16:38:42 +08:00