domain.java.vm 1.2 KB
package ${packageName}.domain;

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 lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * ${functionName}表 ${tableName}
 * 
 * @author ${author}
 * @date ${datetime}
 */
#if ($tableName.contains("_"))
@TableName(value = "${tableName}")
@Data
#end
public class ${ClassName} implements Serializable{
	private static final long serialVersionUID = 1L;
	
#foreach ($column in $columns)
        /** $column.columnComment */
    #if(${column.isPk} == 1 && ${column.isIncrement} == 1)
    @TableId(value = "${column.columnName}", type = IdType.AUTO)
    #elseif (${column.isPk} == 1)
    @TableId(value = "${column.columnName}", type = IdType.INPUT)
        #else
    @TableField(value = "${column.columnName}")
    #end
	private $column.javaType $column.columnName;
#end

}