import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CnEnum } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-11-11 14:27
 */
interface CnEnumCU extends ConditionUtil<CnEnumCU>{
    CODE:FieldUtil<CnEnumCU>;
    NAME:FieldUtil<CnEnumCU>;
    VALUE:FieldUtil<CnEnumCU>;
    SEQ_NO:FieldUtil<CnEnumCU>;
    DESCRIPTION:FieldUtil<CnEnumCU>;
    CREATE_TIME:FieldUtil<CnEnumCU>;
    UPDATE_TIME:FieldUtil<CnEnumCU>;
}

class CnEnumCUImpl extends ConditionUtilImpl<CnEnumCUImpl> implements CnEnumCU{ 
    newInstance(): CnEnumCUImpl {
        return new CnEnumCUImpl();
    } 
    get CODE(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('code','code','代码', this);
    }
    get NAME(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('name','name','名称', this);
    }
    get VALUE(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('value','value','值', this);
    }
    get SEQ_NO(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('seq_no','seqNo','顺序号', this);
    }
    get DESCRIPTION(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('description','description','描述', this);
    }
    get CREATE_TIME(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<CnEnumCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class CnEnumMU extends TableUtilImpl<CnEnumCU,CnEnum>{ 
    tableName  = 'cn_enum';
    tableFields  = ['code','name','value','seq_no','description','create_time','update_time'];
    modelFields  = ['code','name','value','seqNo','description','createTime','updateTime'];
    modelIdFields  = ['code','value'];
    tableIdFields  = ['code','value'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CnEnumCU {
        return new CnEnumCUImpl();
    }   

    static get CODE(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('code','code','代码', new CnEnumCUImpl());
    }
    static get NAME(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('name','name','名称', new CnEnumCUImpl());
    }
    static get VALUE(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('value','value','值', new CnEnumCUImpl());
    }
    static get SEQ_NO(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('seq_no','seqNo','顺序号', new CnEnumCUImpl());
    }
    static get DESCRIPTION(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('description','description','描述', new CnEnumCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new CnEnumCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CnEnumCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new CnEnumCUImpl());
    }

    get CODE(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.CODE;
    }
    get NAME(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.NAME;
    }
    get VALUE(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.VALUE;
    }
    get SEQ_NO(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.SEQ_NO;
    }
    get DESCRIPTION(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.DESCRIPTION;
    }
    get CREATE_TIME(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<CnEnumCU>{ 
        return CnEnumMU.UPDATE_TIME;
    }
}
export {CnEnumMU, CnEnumCU}
