import {ModelUtil, ModelUtilImpl, ModelConditionUtil, ModelConditionUtilImpl, FieldConditionUtil } from 'model-util'

/**
 * @author Keytop midend auto generate
 * @version 1.0
 * @date 2020-05-26 09:28
 */
interface QBmViewModel{
    id: string;
    name: string;
    scopeCode: string;
    versionNo: string;
    createTime: Date;
    updateTime: Date;
}
interface QBmViewModelMCU extends ModelConditionUtil<QBmViewModelMCU>{
    ID:FieldConditionUtil<QBmViewModelMCU>;
    NAME:FieldConditionUtil<QBmViewModelMCU>;
    SCOPE_CODE:FieldConditionUtil<QBmViewModelMCU>;
    VERSION_NO:FieldConditionUtil<QBmViewModelMCU>;
    CREATE_TIME:FieldConditionUtil<QBmViewModelMCU>;
    UPDATE_TIME:FieldConditionUtil<QBmViewModelMCU>;
}

class QBmViewModelMCUImpl extends ModelConditionUtilImpl<QBmViewModelMCUImpl> implements QBmViewModelMCU{ 
    newInstance(): QBmViewModelMCUImpl {
        return new QBmViewModelMCUImpl();
    } 
    private _ID: FieldConditionUtil<QBmViewModelMCU>;
    get ID(): FieldConditionUtil<QBmViewModelMCU>{  
        return new FieldConditionUtil('id', this);
    }
    private _NAME: FieldConditionUtil<QBmViewModelMCU>;
    get NAME(): FieldConditionUtil<QBmViewModelMCU>{  
        return new FieldConditionUtil('name', this);
    }
    private _SCOPE_CODE: FieldConditionUtil<QBmViewModelMCU>;
    get SCOPE_CODE(): FieldConditionUtil<QBmViewModelMCU>{  
        return new FieldConditionUtil('scope_code', this);
    }
    private _VERSION_NO: FieldConditionUtil<QBmViewModelMCU>;
    get VERSION_NO(): FieldConditionUtil<QBmViewModelMCU>{  
        return new FieldConditionUtil('version_no', this);
    }
    private _CREATE_TIME: FieldConditionUtil<QBmViewModelMCU>;
    get CREATE_TIME(): FieldConditionUtil<QBmViewModelMCU>{  
        return new FieldConditionUtil('create_time', this);
    }
    private _UPDATE_TIME: FieldConditionUtil<QBmViewModelMCU>;
    get UPDATE_TIME(): FieldConditionUtil<QBmViewModelMCU>{  
        return new FieldConditionUtil('update_time', this);
    }
}

class QBmViewModelMU extends ModelUtilImpl<QBmViewModelMCU,QBmViewModel>{ 
    selectSQL ='select a.*,b.code scope_code from bm_view_model a,bm_business_scope b where a.bm_scope_id = b.id';
    modelFields  = ['id','name','scopeCode','versionNo','createTime','updateTime'];

    createModelConditionUtil(): QBmViewModelMCU {
        return new QBmViewModelMCUImpl();
    }   

    private static _ID: FieldConditionUtil<QBmViewModelMCU>;
    static get ID(): FieldConditionUtil<QBmViewModelMCU>{ 
        return new FieldConditionUtil('id', new QBmViewModelMCUImpl());
    }
    private static _NAME: FieldConditionUtil<QBmViewModelMCU>;
    static get NAME(): FieldConditionUtil<QBmViewModelMCU>{ 
        return new FieldConditionUtil('name', new QBmViewModelMCUImpl());
    }
    private static _SCOPE_CODE: FieldConditionUtil<QBmViewModelMCU>;
    static get SCOPE_CODE(): FieldConditionUtil<QBmViewModelMCU>{ 
        return new FieldConditionUtil('scope_code', new QBmViewModelMCUImpl());
    }
    private static _VERSION_NO: FieldConditionUtil<QBmViewModelMCU>;
    static get VERSION_NO(): FieldConditionUtil<QBmViewModelMCU>{ 
        return new FieldConditionUtil('version_no', new QBmViewModelMCUImpl());
    }
    private static _CREATE_TIME: FieldConditionUtil<QBmViewModelMCU>;
    static get CREATE_TIME(): FieldConditionUtil<QBmViewModelMCU>{ 
        return new FieldConditionUtil('create_time', new QBmViewModelMCUImpl());
    }
    private static _UPDATE_TIME: FieldConditionUtil<QBmViewModelMCU>;
    static get UPDATE_TIME(): FieldConditionUtil<QBmViewModelMCU>{ 
        return new FieldConditionUtil('update_time', new QBmViewModelMCUImpl());
    }
}
export {QBmViewModelMCU, QBmViewModelMCUImpl, QBmViewModel, QBmViewModelMU}
