68 lines
1.9 KiB
Plaintext
68 lines
1.9 KiB
Plaintext
package ${packageName}.domain.req;
|
||
|
||
#foreach ($import in $importList)
|
||
import ${import};
|
||
#end
|
||
import com.baomidou.mybatisplus.annotation.TableId;
|
||
import com.baomidou.mybatisplus.annotation.TableName;
|
||
import lombok.Data;
|
||
import lombok.EqualsAndHashCode;
|
||
import lombok.NoArgsConstructor;
|
||
import lombok.AllArgsConstructor;
|
||
import lombok.experimental.SuperBuilder;
|
||
import io.swagger.annotations.*;
|
||
import com.ruoyi.common.annotation.Excel;
|
||
#if($table.crud)
|
||
import com.ruoyi.common.core.domain.BaseEntity;
|
||
#elseif($table.tree)
|
||
import com.ruoyi.common.core.domain.TreeEntity;
|
||
#end
|
||
|
||
/**
|
||
* ${functionName}对象 ${tableName}
|
||
*
|
||
* @author ${author}
|
||
* @date ${datetime}
|
||
*/
|
||
#if($table.crud)
|
||
#set($Entity="BaseEntity")
|
||
#elseif($table.tree)
|
||
#set($Entity="TreeEntity")
|
||
#end
|
||
@Data
|
||
@SuperBuilder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
@ApiModel(value = "${ClassName}SaveReq", description = "${functionName}")
|
||
public class ${ClassName}SaveReq extends ${Entity} {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
#foreach ($column in $columns)
|
||
#if(!$table.isSuperColumn($column.javaField))
|
||
#if($column.isInsert == '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
|
||
@ApiModelProperty(name = "${column.columnComment}", value = "${column.columnComment}"$isRequired)
|
||
private $column.javaType $column.javaField;
|
||
|
||
#end
|
||
#end
|
||
#end
|
||
}
|