import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { DevopsPartitionSwitch } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-03-31 10:35
 */
interface DevopsPartitionSwitchCU extends ConditionUtil<DevopsPartitionSwitchCU>{
    ID:FieldUtil<DevopsPartitionSwitchCU>;
    CREATE_TIME:FieldUtil<DevopsPartitionSwitchCU>;
    UPDATE_TIME:FieldUtil<DevopsPartitionSwitchCU>;
    PARTITION_STATUS:FieldUtil<DevopsPartitionSwitchCU>;
    RESTORE_EMERGENCY_MODE_URL:FieldUtil<DevopsPartitionSwitchCU>;
    PARTITION_NAME:FieldUtil<DevopsPartitionSwitchCU>;
    PARTITION_CODE:FieldUtil<DevopsPartitionSwitchCU>;
}

class DevopsPartitionSwitchCUImpl extends ConditionUtilImpl<DevopsPartitionSwitchCUImpl> implements DevopsPartitionSwitchCU{ 
    newInstance(): DevopsPartitionSwitchCUImpl {
        return new DevopsPartitionSwitchCUImpl();
    } 
    get ID(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('ID','id','主键', this);
    }
    get CREATE_TIME(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
    get PARTITION_STATUS(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('PARTITION_STATUS','partitionStatus','分区状态：0-正常，1-异常', this);
    }
    get RESTORE_EMERGENCY_MODE_URL(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('RESTORE_EMERGENCY_MODE_URL','restoreEmergencyModeUrl','恢复紧急模式url地址', this);
    }
    get PARTITION_NAME(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('PARTITION_NAME','partitionName','分区名称', this);
    }
    get PARTITION_CODE(): FieldUtil<DevopsPartitionSwitchCU>{  
        return new FieldUtil('PARTITION_CODE','partitionCode','分区编码', this);
    }
}

@Singleton 
class DevopsPartitionSwitchMU extends TableUtilImpl<DevopsPartitionSwitchCU,DevopsPartitionSwitch>{ 
    tableName  = 'devops_partition_switch';
    tableFields  = ['id','create_time','update_time','partition_status','restore_emergency_mode_url','partition_name','partition_code'];
    modelFields  = ['id','createTime','updateTime','partitionStatus','restoreEmergencyModeUrl','partitionName','partitionCode'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): DevopsPartitionSwitchCU {
        return new DevopsPartitionSwitchCUImpl();
    }   

    static get ID(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('ID','id','主键', new DevopsPartitionSwitchCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new DevopsPartitionSwitchCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new DevopsPartitionSwitchCUImpl());
    }
    static get PARTITION_STATUS(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('PARTITION_STATUS','partitionStatus','分区状态：0-正常，1-异常', new DevopsPartitionSwitchCUImpl());
    }
    static get RESTORE_EMERGENCY_MODE_URL(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('RESTORE_EMERGENCY_MODE_URL','restoreEmergencyModeUrl','恢复紧急模式url地址', new DevopsPartitionSwitchCUImpl());
    }
    static get PARTITION_NAME(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('PARTITION_NAME','partitionName','分区名称', new DevopsPartitionSwitchCUImpl());
    }
    static get PARTITION_CODE(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return new FieldUtil('PARTITION_CODE','partitionCode','分区编码', new DevopsPartitionSwitchCUImpl());
    }

    get ID(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.ID;
    }
    get CREATE_TIME(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.UPDATE_TIME;
    }
    get PARTITION_STATUS(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.PARTITION_STATUS;
    }
    get RESTORE_EMERGENCY_MODE_URL(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.RESTORE_EMERGENCY_MODE_URL;
    }
    get PARTITION_NAME(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.PARTITION_NAME;
    }
    get PARTITION_CODE(): FieldUtil<DevopsPartitionSwitchCU>{ 
        return DevopsPartitionSwitchMU.PARTITION_CODE;
    }
}
export {DevopsPartitionSwitchMU, DevopsPartitionSwitchCU}
