/*
* Copyright (c) ${Company} Corporation ${Year} . All rights reserved.
*
*/
package ${entityPackage};

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.Size;

import net.northking.cctp.common.db.POJO;
import net.northking.cctp.common.db.entity.Entity;
import net.northking.cctp.common.saas.db.TenantPartition;
import net.northking.cctp.common.validation.ValAddGroup;
import net.northking.cctp.common.validation.ValUpdateGroup;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * ${javaClassRef.getComment()}
 *
 * <p>${Attention}  <br>
 * createdate:  ${now}  <br>
 * @author:  ${Author}  <br>
 * @since:  ${Version} <br>
 */
@ApiModel(description = "${javaClassRef.getComment()}")
public class ${javaClassRef.getClassName()} extends TenantPartition implements Entity
{
#foreach( ${attrRef} in ${javaClassRef.getAttributes()} )
  public static final String KEY_${attrRef.getRefName()} = "${attrRef.getRefName()}";
#end

#foreach( ${attrRef} in ${javaClassRef.getAttributes()} )
  /**
   * ${attrRef.getComment()}<br>
   */
  @ApiModelProperty("${attrRef.getComment()}")
#if(${attrRef.getMaxSize()} > 0)
  @Size(max = ${attrRef.getMaxSize()}, message="${attrRef.getComment()}-${attrRef.getRefName()}: 数据长度不能 > ${attrRef.getMaxSize()}" )
#end
  private ${attrRef.getJavaTypeName()} ${attrRef.getRefName()};
#end

#foreach( ${attrRef} in ${javaClassRef.getAttributes()} )
  /**
   * ${attrRef.getComment()}<br>
   */
  public ${attrRef.getJavaTypeName()} get${attrRef.getClassName()}()
  {
  #if(${attrRef.getJavaTypeName()} eq "Date")
    if(${attrRef.getRefName()} != null)
    {
      return (Date)${attrRef.getRefName()}.clone();
    }
    return null;
  #else
    return ${attrRef.getRefName()};
  #end
  }

  /**
   * ${attrRef.getComment()}<br>
   *
   * @param ${attrRef.getRefName()} ${attrRef.getComment()}
   */
  public void set${attrRef.getClassName()}(${attrRef.getJavaTypeName()} ${attrRef.getRefName()})
  {
  #if(${attrRef.getJavaTypeName()} eq "Date")
    if(${attrRef.getRefName()} != null)
    {
      this.${attrRef.getRefName()} = (Date)${attrRef.getRefName()}.clone();
    }
  #else
    this.${attrRef.getRefName()} = ${attrRef.getRefName()};
  #end
  }
#end

  public ${javaClassRef.getClassName()}()
  {
  }

}
