import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { TapdReviewDatabase } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-08-17 18:32
 */
interface TapdReviewDatabaseCU extends ConditionUtil<TapdReviewDatabaseCU>{
    ID:FieldUtil<TapdReviewDatabaseCU>;
    INSTANCE_ID:FieldUtil<TapdReviewDatabaseCU>;
    INSTANCE_NAME:FieldUtil<TapdReviewDatabaseCU>;
    DATABASE_NAME:FieldUtil<TapdReviewDatabaseCU>;
    SQL:FieldUtil<TapdReviewDatabaseCU>;
    TAPD_ID:FieldUtil<TapdReviewDatabaseCU>;
    CREATE_TIME:FieldUtil<TapdReviewDatabaseCU>;
    UPDATE_TIME:FieldUtil<TapdReviewDatabaseCU>;
}

class TapdReviewDatabaseCUImpl extends ConditionUtilImpl<TapdReviewDatabaseCUImpl> implements TapdReviewDatabaseCU{ 
    newInstance(): TapdReviewDatabaseCUImpl {
        return new TapdReviewDatabaseCUImpl();
    } 
    get ID(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('id','id','', this);
    }
    get INSTANCE_ID(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('instance_id','instanceId','实例ID', this);
    }
    get INSTANCE_NAME(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('instance_name','instanceName','主机名', this);
    }
    get DATABASE_NAME(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('database_name','databaseName','数据库名', this);
    }
    get SQL(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('sql','sql','sql语句', this);
    }
    get TAPD_ID(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('tapd_id','tapdId','', this);
    }
    get CREATE_TIME(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<TapdReviewDatabaseCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class TapdReviewDatabaseMU extends TableUtilImpl<TapdReviewDatabaseCU,TapdReviewDatabase>{ 
    tableName  = 'tapd_review_database';
    tableFields  = ['id','instance_id','instance_name','database_name','sql','tapd_id','create_time','update_time'];
    modelFields  = ['id','instanceId','instanceName','databaseName','sql','tapdId','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): TapdReviewDatabaseCU {
        return new TapdReviewDatabaseCUImpl();
    }   

    static get ID(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('id','id','', new TapdReviewDatabaseCUImpl());
    }
    static get INSTANCE_ID(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('instance_id','instanceId','实例ID', new TapdReviewDatabaseCUImpl());
    }
    static get INSTANCE_NAME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('instance_name','instanceName','主机名', new TapdReviewDatabaseCUImpl());
    }
    static get DATABASE_NAME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('database_name','databaseName','数据库名', new TapdReviewDatabaseCUImpl());
    }
    static get SQL(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('sql','sql','sql语句', new TapdReviewDatabaseCUImpl());
    }
    static get TAPD_ID(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('tapd_id','tapdId','', new TapdReviewDatabaseCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new TapdReviewDatabaseCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new TapdReviewDatabaseCUImpl());
    }

    get ID(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.ID;
    }
    get INSTANCE_ID(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.INSTANCE_ID;
    }
    get INSTANCE_NAME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.INSTANCE_NAME;
    }
    get DATABASE_NAME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.DATABASE_NAME;
    }
    get SQL(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.SQL;
    }
    get TAPD_ID(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.TAPD_ID;
    }
    get CREATE_TIME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<TapdReviewDatabaseCU>{ 
        return TapdReviewDatabaseMU.UPDATE_TIME;
    }
}
export {TapdReviewDatabaseMU, TapdReviewDatabaseCU}
