2024-04-22 08:45:46 +08:00
|
|
|
|
package ${packageName}.domain;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.annotation.JSONField;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
import lombok.Builder;
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ${functionName}对象 ${tableName}
|
|
|
|
|
*
|
|
|
|
|
* @author ${author}
|
|
|
|
|
* @date ${datetime}
|
|
|
|
|
*/
|
|
|
|
|
@Data
|
|
|
|
|
@NoArgsConstructor
|
|
|
|
|
@AllArgsConstructor
|
|
|
|
|
@Builder
|
|
|
|
|
@ApiModel("${functionName}")
|
2024-04-22 08:58:46 +08:00
|
|
|
|
@TableName("${tableName}")
|
2024-04-22 08:45:46 +08:00
|
|
|
|
public class ${ClassName}{
|
|
|
|
|
private static final long serialVersionUID=1L;
|
|
|
|
|
|
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
|
#if(!$table.isSuperColumn($column.javaField))
|
|
|
|
|
/** $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
|
|
|
|
|
#end
|
|
|
|
|
#if($column.isPk == 1)
|
|
|
|
|
@JSONField(serializeUsing = ToStringSerializer.class)
|
|
|
|
|
@ApiModelProperty("$column.columnComment")
|
|
|
|
|
@TableId(value = "$column.columnName" , type = IdType.ASSIGN_ID)
|
|
|
|
|
private $column.javaType $column.javaField;
|
|
|
|
|
#else
|
|
|
|
|
@ApiModelProperty("$column.columnComment")
|
|
|
|
|
@TableField("$column.columnName")
|
|
|
|
|
private $column.javaType $column.javaField;
|
|
|
|
|
#end
|
|
|
|
|
#else
|
|
|
|
|
#if($column.javaType == 'Date')
|
|
|
|
|
/** $column.columnComment */
|
|
|
|
|
@ApiModelProperty("$column.columnComment")
|
|
|
|
|
@TableField("$column.columnName")
|
|
|
|
|
@JSONField(serializeUsing = ToStringSerializer.class)
|
|
|
|
|
private String $column.javaField;
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
}
|