import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { SysParams } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-06-08 17:20
 */
interface SysParamsCU extends ConditionUtil<SysParamsCU>{
    ID:FieldUtil<SysParamsCU>;
    CREATE_TIME:FieldUtil<SysParamsCU>;
    UPDATE_TIME:FieldUtil<SysParamsCU>;
    STATE:FieldUtil<SysParamsCU>;
    PARAM_NAME:FieldUtil<SysParamsCU>;
    PARAM_VALUE:FieldUtil<SysParamsCU>;
}

class SysParamsCUImpl extends ConditionUtilImpl<SysParamsCUImpl> implements SysParamsCU{ 
    newInstance(): SysParamsCUImpl {
        return new SysParamsCUImpl();
    } 
    get ID(): FieldUtil<SysParamsCU>{  
        return new FieldUtil('id','id','', this);
    }
    get CREATE_TIME(): FieldUtil<SysParamsCU>{  
        return new FieldUtil('create_time','createTime','', this);
    }
    get UPDATE_TIME(): FieldUtil<SysParamsCU>{  
        return new FieldUtil('update_time','updateTime','', this);
    }
    get STATE(): FieldUtil<SysParamsCU>{  
        return new FieldUtil('state','state','', this);
    }
    get PARAM_NAME(): FieldUtil<SysParamsCU>{  
        return new FieldUtil('param_name','paramName','', this);
    }
    get PARAM_VALUE(): FieldUtil<SysParamsCU>{  
        return new FieldUtil('param_value','paramValue','', this);
    }
}

@Singleton 
class SysParamsMU extends TableUtilImpl<SysParamsCU,SysParams>{ 
    tableName  = 'sys_params';
    tableFields  = ['id','create_time','update_time','state','param_name','param_value'];
    modelFields  = ['id','createTime','updateTime','state','paramName','paramValue'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): SysParamsCU {
        return new SysParamsCUImpl();
    }   

    static get ID(): FieldUtil<SysParamsCU>{ 
        return new FieldUtil('id','id','', new SysParamsCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<SysParamsCU>{ 
        return new FieldUtil('create_time','createTime','', new SysParamsCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<SysParamsCU>{ 
        return new FieldUtil('update_time','updateTime','', new SysParamsCUImpl());
    }
    static get STATE(): FieldUtil<SysParamsCU>{ 
        return new FieldUtil('state','state','', new SysParamsCUImpl());
    }
    static get PARAM_NAME(): FieldUtil<SysParamsCU>{ 
        return new FieldUtil('param_name','paramName','', new SysParamsCUImpl());
    }
    static get PARAM_VALUE(): FieldUtil<SysParamsCU>{ 
        return new FieldUtil('param_value','paramValue','', new SysParamsCUImpl());
    }

    get ID(): FieldUtil<SysParamsCU>{ 
        return SysParamsMU.ID;
    }
    get CREATE_TIME(): FieldUtil<SysParamsCU>{ 
        return SysParamsMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<SysParamsCU>{ 
        return SysParamsMU.UPDATE_TIME;
    }
    get STATE(): FieldUtil<SysParamsCU>{ 
        return SysParamsMU.STATE;
    }
    get PARAM_NAME(): FieldUtil<SysParamsCU>{ 
        return SysParamsMU.PARAM_NAME;
    }
    get PARAM_VALUE(): FieldUtil<SysParamsCU>{ 
        return SysParamsMU.PARAM_VALUE;
    }
}
export {SysParamsMU, SysParamsCU}
