import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { SystemParams } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-16 11:27
 */
interface SystemParamsCU extends ConditionUtil<SystemParamsCU>{
    ID:FieldUtil<SystemParamsCU>;
    PARAM_NAME:FieldUtil<SystemParamsCU>;
    PARAM_VALUE:FieldUtil<SystemParamsCU>;
    REMARK:FieldUtil<SystemParamsCU>;
}

class SystemParamsCUImpl extends ConditionUtilImpl<SystemParamsCUImpl> implements SystemParamsCU{ 
    newInstance(): SystemParamsCUImpl {
        return new SystemParamsCUImpl();
    } 
    get ID(): FieldUtil<SystemParamsCU>{  
        return new FieldUtil('ID','id','主键', this);
    }
    get PARAM_NAME(): FieldUtil<SystemParamsCU>{  
        return new FieldUtil('PARAM_NAME','paramName','参数名称', this);
    }
    get PARAM_VALUE(): FieldUtil<SystemParamsCU>{  
        return new FieldUtil('PARAM_VALUE','paramValue','参数值', this);
    }
    get REMARK(): FieldUtil<SystemParamsCU>{  
        return new FieldUtil('REMARK','remark','备注', this);
    }
}

@Singleton 
class SystemParamsMU extends TableUtilImpl<SystemParamsCU,SystemParams>{ 
    tableName  = 'system_params';
    tableFields  = ['id','param_name','param_value','remark'];
    modelFields  = ['id','paramName','paramValue','remark'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): SystemParamsCU {
        return new SystemParamsCUImpl();
    }   

    static get ID(): FieldUtil<SystemParamsCU>{ 
        return new FieldUtil('ID','id','主键', new SystemParamsCUImpl());
    }
    static get PARAM_NAME(): FieldUtil<SystemParamsCU>{ 
        return new FieldUtil('PARAM_NAME','paramName','参数名称', new SystemParamsCUImpl());
    }
    static get PARAM_VALUE(): FieldUtil<SystemParamsCU>{ 
        return new FieldUtil('PARAM_VALUE','paramValue','参数值', new SystemParamsCUImpl());
    }
    static get REMARK(): FieldUtil<SystemParamsCU>{ 
        return new FieldUtil('REMARK','remark','备注', new SystemParamsCUImpl());
    }

    get ID(): FieldUtil<SystemParamsCU>{ 
        return SystemParamsMU.ID;
    }
    get PARAM_NAME(): FieldUtil<SystemParamsCU>{ 
        return SystemParamsMU.PARAM_NAME;
    }
    get PARAM_VALUE(): FieldUtil<SystemParamsCU>{ 
        return SystemParamsMU.PARAM_VALUE;
    }
    get REMARK(): FieldUtil<SystemParamsCU>{ 
        return SystemParamsMU.REMARK;
    }
}
export {SystemParamsMU, SystemParamsCU}
