import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { DevopsSwitchPartitionCharge } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-06-24 17:22
 */
interface DevopsSwitchPartitionChargeCU extends ConditionUtil<DevopsSwitchPartitionChargeCU>{
    ID:FieldUtil<DevopsSwitchPartitionChargeCU>;
    WEBSITE_NAME:FieldUtil<DevopsSwitchPartitionChargeCU>;
    WEBSITE_CODE:FieldUtil<DevopsSwitchPartitionChargeCU>;
    PORT:FieldUtil<DevopsSwitchPartitionChargeCU>;
    CURRENT_PARTITION:FieldUtil<DevopsSwitchPartitionChargeCU>;
    REMARK:FieldUtil<DevopsSwitchPartitionChargeCU>;
    CREATE_TIME:FieldUtil<DevopsSwitchPartitionChargeCU>;
    UPDATE_TIME:FieldUtil<DevopsSwitchPartitionChargeCU>;
}

class DevopsSwitchPartitionChargeCUImpl extends ConditionUtilImpl<DevopsSwitchPartitionChargeCUImpl> implements DevopsSwitchPartitionChargeCU{ 
    newInstance(): DevopsSwitchPartitionChargeCUImpl {
        return new DevopsSwitchPartitionChargeCUImpl();
    } 
    get ID(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get WEBSITE_NAME(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('website_name','websiteName','网站名称', this);
    }
    get WEBSITE_CODE(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('website_code','websiteCode','网站编码', this);
    }
    get PORT(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('port','port','端口', this);
    }
    get CURRENT_PARTITION(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('current_partition','currentPartition','当前分区：0-蓝区，1-绿区', this);
    }
    get REMARK(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('remark','remark','描述', this);
    }
    get CREATE_TIME(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<DevopsSwitchPartitionChargeCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class DevopsSwitchPartitionChargeMU extends TableUtilImpl<DevopsSwitchPartitionChargeCU,DevopsSwitchPartitionCharge>{ 
    tableName  = 'devops_switch_partition_charge';
    tableFields  = ['id','website_name','website_code','port','current_partition','remark','create_time','update_time'];
    modelFields  = ['id','websiteName','websiteCode','port','currentPartition','remark','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): DevopsSwitchPartitionChargeCU {
        return new DevopsSwitchPartitionChargeCUImpl();
    }   

    static get ID(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('id','id','主键', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get WEBSITE_NAME(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('website_name','websiteName','网站名称', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get WEBSITE_CODE(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('website_code','websiteCode','网站编码', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get PORT(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('port','port','端口', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get CURRENT_PARTITION(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('current_partition','currentPartition','当前分区：0-蓝区，1-绿区', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get REMARK(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('remark','remark','描述', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new DevopsSwitchPartitionChargeCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new DevopsSwitchPartitionChargeCUImpl());
    }

    get ID(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.ID;
    }
    get WEBSITE_NAME(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.WEBSITE_NAME;
    }
    get WEBSITE_CODE(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.WEBSITE_CODE;
    }
    get PORT(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.PORT;
    }
    get CURRENT_PARTITION(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.CURRENT_PARTITION;
    }
    get REMARK(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.REMARK;
    }
    get CREATE_TIME(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<DevopsSwitchPartitionChargeCU>{ 
        return DevopsSwitchPartitionChargeMU.UPDATE_TIME;
    }
}
export {DevopsSwitchPartitionChargeMU, DevopsSwitchPartitionChargeCU}
