package com.boman.domain;

import java.util.List;

/**
 * 业务表 gen_table
 * 
 * @author ruoyi
 */
public class GenTable extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;
    /**
     * 前端传来提示修改的状态 1:修改gen_table  2:修改gen_table_column
     */
    private String updateType;

    /** 表名称 */
//    @NotBlank(message = "表名称不能为空")
    private String tableName;

    /** 表描述 */
//    @NotBlank(message = "表描述不能为空")
    private String tableComment;

    /** 关联父表的表名 */
    private String subTableName;

    /** 本表关联父表的外键名 */
    private String subTableFkName;

    /** 实体类名称(首字母大写) */
    //@NotBlank(message = "实体类名称不能为空")
    private String className;

    /** 使用的模板（crud单表操作 tree树表操作 sub主子表操作） */
    private String tplCategory;

    /** 生成包路径 */
    //@NotBlank(message = "生成包路径不能为空")
    private String packageName;

    /** 生成模块名 */
    //@NotBlank(message = "生成模块名不能为空")
    private String moduleName;

    /** 生成业务名 */
    //@NotBlank(message = "生成业务名不能为空")
    private String businessName;

    /** 生成功能名 */
    //@NotBlank(message = "生成功能名不能为空")
    private String functionName;

    /** 生成作者 */
    //@NotBlank(message = "作者不能为空")
    private String functionAuthor;

    /** 生成代码方式（0zip压缩包 1自定义路径） */
    private String genType;

    /** 生成路径（不填默认项目路径） */
    private String genPath;

    /** 主键信息 */
    private GenTableColumn pkColumn;

    /** 子表信息 */
    private GenTable subTable;

    /** 表列信息 */
//    @Valid
    private List<GenTableColumn> columns;

    /** 主表关联的附表信息（附表包含字段信息） */
//    @Valid
    private List<GenTable> relationList;

    /** 其它生成选项 */
    private String options;

    /**
     * 是否菜单
     */
    private String isMenu;

    /**
     * 菜单权限(AMDQSUE)
     */
//    @NotBlank(message = "菜单权限不能为空")
    private String menuRole;

    /**
     * 输入字段
     */
    private Long akColumn;
    private String akColumnName;

    /**
     * 输出字段
     */
    private Long dkColumn;
    private String dkColumnName;

    /**
     * 新增触发器
     */
    private String triggerCreate;

    /**
     * 检索触发器
     */
    private String triggerRetrieve;

    /**
     * 修改触发器
     */
    private String triggerUpdate;

    /**
     * 删除触发器
     */
    private String triggerDelete;

    /**
     * 提交触发器
     */
    private String triggerSubmit;

    /**
     * 实际数据库名称
     */
    private String realTableName;

    /**
     * 过滤条件
     */
    private String filterConditions;

    /**
     * 扩展属性
     */
    private String extendedAttributes;


    /** 树编码字段 */
    private String treeCode;

    /** 树父编码字段 */
    private String treeParentCode;

    /** 树名称字段 */
    private String treeName;

    /** 上级菜单ID字段 */
    private String parentMenuId;

    /** 上级菜单名称字段 */
    private String parentMenuName;


    /**
     * 对应表主键
     */
    private Long tablePrimaryKey;

    /**
     * 主键名称
     */
    private String tablePrimaryKeyName;

    /**
     * 此表中的字段是否含有blob的列, true含
     */
    private Boolean isContainsBlob;

    /**
     * 列宽
     */
    private Integer tableColumn;


    public Integer getTableColumn() {
        return tableColumn;
    }

    public void setTableColumn(Integer tableColumn) {
        this.tableColumn = tableColumn;
    }

    public String getUpdateType() {
        return updateType;
    }

    public void setUpdateType(String updateType) {
        this.updateType = updateType;
    }

    public String getAkColumnName() {
        return akColumnName;
    }

    public void setAkColumnName(String akColumnName) {
        this.akColumnName = akColumnName;
    }

    public String getDkColumnName() {
        return dkColumnName;
    }

    public void setDkColumnName(String dkColumnName) {
        this.dkColumnName = dkColumnName;
    }

    public String getTablePrimaryKeyName() {
        return tablePrimaryKeyName;
    }

    public void setTablePrimaryKeyName(String tablePrimaryKeyName) {
        this.tablePrimaryKeyName = tablePrimaryKeyName;
    }

    public Long getTablePrimaryKey() {
        return tablePrimaryKey;
    }

    public void setTablePrimaryKey(Long tablePrimaryKey) {
        this.tablePrimaryKey = tablePrimaryKey;
    }

    public String getRealTableName() {
        return realTableName;
    }

    public void setRealTableName(String realTableName) {
        this.realTableName = realTableName;
    }

    public String getFilterConditions() {
        return filterConditions;
    }

    public void setFilterConditions(String filterConditions) {
        this.filterConditions = filterConditions;
    }

    public String getExtendedAttributes() {
        return extendedAttributes;
    }

    public void setExtendedAttributes(String extendedAttributes) {
        this.extendedAttributes = extendedAttributes;
    }

    public String getTriggerCreate() {
        return triggerCreate;
    }

    public void setTriggerCreate(String triggerCreate) {
        this.triggerCreate = triggerCreate;
    }

    public String getTriggerRetrieve() {
        return triggerRetrieve;
    }

    public void setTriggerRetrieve(String triggerRetrieve) {
        this.triggerRetrieve = triggerRetrieve;
    }

    public String getTriggerUpdate() {
        return triggerUpdate;
    }

    public void setTriggerUpdate(String triggerUpdate) {
        this.triggerUpdate = triggerUpdate;
    }

    public String getTriggerDelete() {
        return triggerDelete;
    }

    public void setTriggerDelete(String triggerDelete) {
        this.triggerDelete = triggerDelete;
    }

    public String getTriggerSubmit() {
        return triggerSubmit;
    }

    public void setTriggerSubmit(String triggerSubmit) {
        this.triggerSubmit = triggerSubmit;
    }

    public Long getAkColumn() {
        return akColumn;
    }

    public void setAkColumn(Long akColumn) {
        this.akColumn = akColumn;
    }

    public Long getDkColumn() {
        return dkColumn;
    }

    public void setDkColumn(Long dkColumn) {
        this.dkColumn = dkColumn;
    }

    public String getIsMenu() {
        return isMenu;
    }

    public void setIsMenu(String isMenu) {
        this.isMenu = isMenu;
    }

    public String getMenuRole() {
        return menuRole;
    }

    public void setMenuRole(String menuRole) {
        this.menuRole = menuRole;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTableName()
    {
        return tableName;
    }

    public void setTableName(String tableName)
    {
        this.tableName = tableName;
    }

    public String getTableComment()
    {
        return tableComment;
    }

    public void setTableComment(String tableComment)
    {
        this.tableComment = tableComment;
    }

    public String getSubTableName()
    {
        return subTableName;
    }

    public void setSubTableName(String subTableName)
    {
        this.subTableName = subTableName;
    }

    public String getSubTableFkName()
    {
        return subTableFkName;
    }

    public void setSubTableFkName(String subTableFkName)
    {
        this.subTableFkName = subTableFkName;
    }

    public String getClassName()
    {
        return className;
    }

    public void setClassName(String className)
    {
        this.className = className;
    }

    public String getTplCategory()
    {
        return tplCategory;
    }

    public void setTplCategory(String tplCategory)
    {
        this.tplCategory = tplCategory;
    }

    public String getPackageName()
    {
        return packageName;
    }

    public void setPackageName(String packageName)
    {
        this.packageName = packageName;
    }

    public String getModuleName()
    {
        return moduleName;
    }

    public void setModuleName(String moduleName)
    {
        this.moduleName = moduleName;
    }

    public String getBusinessName()
    {
        return businessName;
    }

    public void setBusinessName(String businessName)
    {
        this.businessName = businessName;
    }

    public String getFunctionName()
    {
        return functionName;
    }

    public void setFunctionName(String functionName)
    {
        this.functionName = functionName;
    }

    public String getFunctionAuthor()
    {
        return functionAuthor;
    }

    public void setFunctionAuthor(String functionAuthor)
    {
        this.functionAuthor = functionAuthor;
    }

    public String getGenType()
    {
        return genType;
    }

    public void setGenType(String genType)
    {
        this.genType = genType;
    }

    public String getGenPath()
    {
        return genPath;
    }

    public void setGenPath(String genPath)
    {
        this.genPath = genPath;
    }

    public GenTableColumn getPkColumn()
    {
        return pkColumn;
    }

    public void setPkColumn(GenTableColumn pkColumn)
    {
        this.pkColumn = pkColumn;
    }

    public GenTable getSubTable()
    {
        return subTable;
    }

    public void setSubTable(GenTable subTable)
    {
        this.subTable = subTable;
    }
    public List<GenTableColumn> getColumns()
    {
        return columns;
    }

    public void setColumns(List<GenTableColumn> columns)
    {
        this.columns = columns;
    }

    public String getOptions()
    {
        return options;
    }

    public void setOptions(String options)
    {
        this.options = options;
    }

    public String getTreeCode()
    {
        return treeCode;
    }

    public void setTreeCode(String treeCode)
    {
        this.treeCode = treeCode;
    }

    public String getTreeParentCode()
    {
        return treeParentCode;
    }

    public void setTreeParentCode(String treeParentCode)
    {
        this.treeParentCode = treeParentCode;
    }

    public String getTreeName()
    {
        return treeName;
    }

    public void setTreeName(String treeName)
    {
        this.treeName = treeName;
    }

    public String getParentMenuId()
    {
        return parentMenuId;
    }

    public void setParentMenuId(String parentMenuId)
    {
        this.parentMenuId = parentMenuId;
    }

    public String getParentMenuName()
    {
        return parentMenuName;
    }

    public void setParentMenuName(String parentMenuName)
    {
        this.parentMenuName = parentMenuName;
    }

//    public boolean isSub()
//    {
//        return isSub(this.tplCategory);
//    }
//
//    public static boolean isSub(String tplCategory)
//    {
//        return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory);
//    }
//    public boolean isTree()
//    {
//        return isTree(this.tplCategory);
//    }
//
//    public static boolean isTree(String tplCategory)
//    {
//        return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory);
//    }
//
//    public boolean isCrud()
//    {
//        return isCrud(this.tplCategory);
//    }

//    public static boolean isCrud(String tplCategory)
//    {
//        return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory);
//    }

//    public boolean isSuperColumn(String javaField)
//    {
//        return isSuperColumn(this.tplCategory, javaField);
//    }

//    public static boolean isSuperColumn(String tplCategory, String javaField)
//    {
//        if (isTree(tplCategory))
//        {
//            return StringUtils.equalsAnyIgnoreCase(javaField, ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY));
//        }
//        return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
//    }

    public List<GenTable> getRelationList() {
        return relationList;
    }

    public void setRelationList(List<GenTable> relationList) {
        this.relationList = relationList;
    }

    public Boolean getIsContainsBlob() {
        return isContainsBlob;
    }

    public void setIsContainsBlob(Boolean isContainsBlob) {
        this.isContainsBlob = isContainsBlob;
    }
}
