package ${package}.${moduleName}.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.EqualsAndHashCode;
  #if(${hasBigDecimal})
import java.math.BigDecimal;
#end
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * ${comments}
 *
 * @author ${author}
 * @date ${datetime}
 */
@Data
@TableName("${tableName}")
@EqualsAndHashCode(callSuper = true)
public class ${className} extends Model<${className}> {
	private static final long serialVersionUID = 1L;

#foreach ($column in $columns)
	/**
	 * $column.comments
	 */
	#if($column.columnName == $pk.columnName)
@TableId(type = IdType.AUTO)
	#end
private $column.attrType $column.lowerAttrName;
#end

  /**
   * 主键值
   */
  @Override
  protected Serializable pkVal() {
    return this.$pk.lowerAttrName;
  }
}
