import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MonitorHistoryServiceRel } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-09-15 13:20
 */
interface MonitorHistoryServiceRelCU extends ConditionUtil<MonitorHistoryServiceRelCU>{
    ID:FieldUtil<MonitorHistoryServiceRelCU>;
    HISTORY_ID:FieldUtil<MonitorHistoryServiceRelCU>;
    SERVICE_GROUP_ID:FieldUtil<MonitorHistoryServiceRelCU>;
    CREATE_TIME:FieldUtil<MonitorHistoryServiceRelCU>;
    UPDATE_TIME:FieldUtil<MonitorHistoryServiceRelCU>;
    SERVICE_PROJECT_ID:FieldUtil<MonitorHistoryServiceRelCU>;
}

class MonitorHistoryServiceRelCUImpl extends ConditionUtilImpl<MonitorHistoryServiceRelCUImpl> implements MonitorHistoryServiceRelCU{ 
    newInstance(): MonitorHistoryServiceRelCUImpl {
        return new MonitorHistoryServiceRelCUImpl();
    } 
    get ID(): FieldUtil<MonitorHistoryServiceRelCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get HISTORY_ID(): FieldUtil<MonitorHistoryServiceRelCU>{  
        return new FieldUtil('history_id','historyId','告警历史id', this);
    }
    get SERVICE_GROUP_ID(): FieldUtil<MonitorHistoryServiceRelCU>{  
        return new FieldUtil('service_group_id','serviceGroupId','服务分组id', this);
    }
    get CREATE_TIME(): FieldUtil<MonitorHistoryServiceRelCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MonitorHistoryServiceRelCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
    get SERVICE_PROJECT_ID(): FieldUtil<MonitorHistoryServiceRelCU>{  
        return new FieldUtil('service_project_id','serviceProjectId','service_project_id', this);
    }
}

@Singleton 
class MonitorHistoryServiceRelMU extends TableUtilImpl<MonitorHistoryServiceRelCU,MonitorHistoryServiceRel>{ 
    tableName  = 'monitor_history_service_rel';
    tableFields  = ['id','history_id','service_group_id','create_time','update_time','service_project_id'];
    modelFields  = ['id','historyId','serviceGroupId','createTime','updateTime','serviceProjectId'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MonitorHistoryServiceRelCU {
        return new MonitorHistoryServiceRelCUImpl();
    }   

    static get ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return new FieldUtil('id','id','主键', new MonitorHistoryServiceRelCUImpl());
    }
    static get HISTORY_ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return new FieldUtil('history_id','historyId','告警历史id', new MonitorHistoryServiceRelCUImpl());
    }
    static get SERVICE_GROUP_ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return new FieldUtil('service_group_id','serviceGroupId','服务分组id', new MonitorHistoryServiceRelCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MonitorHistoryServiceRelCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MonitorHistoryServiceRelCUImpl());
    }
    static get SERVICE_PROJECT_ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return new FieldUtil('service_project_id','serviceProjectId','service_project_id', new MonitorHistoryServiceRelCUImpl());
    }

    get ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return MonitorHistoryServiceRelMU.ID;
    }
    get HISTORY_ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return MonitorHistoryServiceRelMU.HISTORY_ID;
    }
    get SERVICE_GROUP_ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return MonitorHistoryServiceRelMU.SERVICE_GROUP_ID;
    }
    get CREATE_TIME(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return MonitorHistoryServiceRelMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return MonitorHistoryServiceRelMU.UPDATE_TIME;
    }
    get SERVICE_PROJECT_ID(): FieldUtil<MonitorHistoryServiceRelCU>{ 
        return MonitorHistoryServiceRelMU.SERVICE_PROJECT_ID;
    }
}
export {MonitorHistoryServiceRelMU, MonitorHistoryServiceRelCU}
