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

class MonitorHistoryContactRelCUImpl extends ConditionUtilImpl<MonitorHistoryContactRelCUImpl> implements MonitorHistoryContactRelCU{ 
    newInstance(): MonitorHistoryContactRelCUImpl {
        return new MonitorHistoryContactRelCUImpl();
    } 
    get ID(): FieldUtil<MonitorHistoryContactRelCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get HISTORY_ID(): FieldUtil<MonitorHistoryContactRelCU>{  
        return new FieldUtil('history_id','historyId','告警历史id', this);
    }
    get CONTACT_GROUP_ID(): FieldUtil<MonitorHistoryContactRelCU>{  
        return new FieldUtil('contact_group_id','contactGroupId','联系组id', this);
    }
    get CREATE_TIME(): FieldUtil<MonitorHistoryContactRelCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MonitorHistoryContactRelCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
}

@Singleton 
class MonitorHistoryContactRelMU extends TableUtilImpl<MonitorHistoryContactRelCU,MonitorHistoryContactRel>{ 
    tableName  = 'monitor_history_contact_rel';
    tableFields  = ['id','history_id','contact_group_id','create_time','update_time'];
    modelFields  = ['id','historyId','contactGroupId','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MonitorHistoryContactRelCU {
        return new MonitorHistoryContactRelCUImpl();
    }   

    static get ID(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return new FieldUtil('id','id','主键', new MonitorHistoryContactRelCUImpl());
    }
    static get HISTORY_ID(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return new FieldUtil('history_id','historyId','告警历史id', new MonitorHistoryContactRelCUImpl());
    }
    static get CONTACT_GROUP_ID(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return new FieldUtil('contact_group_id','contactGroupId','联系组id', new MonitorHistoryContactRelCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MonitorHistoryContactRelCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MonitorHistoryContactRelCUImpl());
    }

    get ID(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return MonitorHistoryContactRelMU.ID;
    }
    get HISTORY_ID(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return MonitorHistoryContactRelMU.HISTORY_ID;
    }
    get CONTACT_GROUP_ID(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return MonitorHistoryContactRelMU.CONTACT_GROUP_ID;
    }
    get CREATE_TIME(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return MonitorHistoryContactRelMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MonitorHistoryContactRelCU>{ 
        return MonitorHistoryContactRelMU.UPDATE_TIME;
    }
}
export {MonitorHistoryContactRelMU, MonitorHistoryContactRelCU}
