import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CrMsgLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-10 11:00
 */
interface CrMsgLogCU extends ConditionUtil<CrMsgLogCU>{
    ID:FieldUtil<CrMsgLogCU>;
    MSG:FieldUtil<CrMsgLogCU>;
    CREATE_TIME:FieldUtil<CrMsgLogCU>;
}

class CrMsgLogCUImpl extends ConditionUtilImpl<CrMsgLogCUImpl> implements CrMsgLogCU{ 
    newInstance(): CrMsgLogCUImpl {
        return new CrMsgLogCUImpl();
    } 
    get ID(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('id','id','', this);
    }
    get MSG(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('msg','msg','', this);
    }
    get CREATE_TIME(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('create_time','createTime','', this);
    }
}

@Singleton 
class CrMsgLogMU extends TableUtilImpl<CrMsgLogCU,CrMsgLog>{ 
    tableName  = 'cr_msg_log';
    tableFields  = ['id','msg','create_time'];
    modelFields  = ['id','msg','createTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CrMsgLogCU {
        return new CrMsgLogCUImpl();
    }   

    static get ID(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('id','id','', new CrMsgLogCUImpl());
    }
    static get MSG(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('msg','msg','', new CrMsgLogCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('create_time','createTime','', new CrMsgLogCUImpl());
    }

    get ID(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.ID;
    }
    get MSG(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.MSG;
    }
    get CREATE_TIME(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.CREATE_TIME;
    }
}
export {CrMsgLogMU, CrMsgLogCU}
