60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
package ${packageName}.domain.req;
|
||
|
||
#foreach ($import in $importList)
|
||
import ${import};
|
||
#end
|
||
import java.util.Date;
|
||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||
import io.swagger.v3.oas.annotations.media.Schema;
|
||
import lombok.Data;
|
||
import lombok.NoArgsConstructor;
|
||
import lombok.AllArgsConstructor;
|
||
import lombok.experimental.SuperBuilder;
|
||
|
||
/**
|
||
* ${functionName}修改请求对象
|
||
*
|
||
* @author ${author}
|
||
* @date ${datetime}
|
||
*/
|
||
#if($table.crud)
|
||
#set($Entity="BaseEntity")
|
||
#elseif($table.tree)
|
||
#set($Entity="TreeEntity")
|
||
#end
|
||
@Data
|
||
@SuperBuilder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
@Schema(description = "${functionName}修改请求对象")
|
||
public class ${ClassName}EditReq {
|
||
|
||
#foreach ($column in $columns)
|
||
#if(!$table.isSuperColumn($column.javaField))
|
||
#if($column.isEdit == '1')
|
||
/**
|
||
* $column.columnComment
|
||
*/
|
||
#if($column.list)
|
||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||
#if($parentheseIndex != -1)
|
||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||
#else
|
||
#set($comment=$column.columnComment)
|
||
#end
|
||
#if($column.javaType == 'Date')
|
||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||
#end
|
||
#end
|
||
#set($isRequired='')
|
||
#if($column.isRequired == '1')
|
||
#set($isRequired=', required = true')
|
||
#end
|
||
@Schema(name = "${column.javaField}", title = "${column.columnComment}", description = "${column.columnComment}" $isRequired)
|
||
private $column.javaType $column.javaField;
|
||
|
||
#end
|
||
#end
|
||
#end
|
||
}
|