Files
qingcheng-houduan/src/main/resources/templates/dto/QueryRequest.java.vm
2025-05-06 19:15:01 +08:00

40 lines
1.2 KiB
Plaintext

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 com.greenorange.promotion.common.PageRequest;
/**
* ${entityComment}查询请求体,继承自分页请求 PageRequest
*/
@Data
@Schema(description = "${entityComment}查询请求体", requiredProperties = {"current", "pageSize"})
public class ${entityName}QueryRequest extends PageRequest implements Serializable {
#foreach($field in ${table.fields})
#if($field.propertyName != "createTime" && $field.propertyName != "updateTime" && $field.propertyName != "isDelete")
/**
* ${field.comment}
*/
#if($field.propertyType == "String")
@NotBlank(message = "${field.comment}不能为空")
#end
#if($field.propertyType == "Long")
@Min(value = 1L, message = "${field.comment} ID不能小于1")
#end
@Schema(description = "${field.comment}", example = "")
private ${field.propertyType} ${field.propertyName};
#end
#end
@Serial
private static final long serialVersionUID = 1L;
}