package #(pkg).domain;

import com.eversec.common.Domain;
#if(hasDate)
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
#end

/**
 * 类名称: #(bean)<br>
 * 类描述: #(remark)<br>
 * 修改时间: #(ctime)<br>
 * @author #(author)
 */
public class #(bean) extends Domain {

    #for(x : fieldList)
    #set(field=x.field
        ,field=field.substring(0, 1).toLowerCase() + field.substring(1)
    )
    #if(x.fieldType == "Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    #end
    private #(x.fieldType) #(field); //#(x.remark)
    #end

    #for(x : fieldList)
        #set(field=x.field
            ,field=field.substring(0, 1).toLowerCase() + field.substring(1)
            ,toUpperCaseFirst = field.substring(0, 1).toUpperCase() + field.substring(1)
        )
    public #(x.fieldType) get#(toUpperCaseFirst)() {
        return #(field);
    }

    public void set#(toUpperCaseFirst)(#(x.fieldType) #(field)) {
        this.#(field) = #(field);
    }

    #end
}