import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdDeliveryPlanCityLotBlacklist } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-08 11:04
 */
interface AdDeliveryPlanCityLotBlacklistCU extends ConditionUtil<AdDeliveryPlanCityLotBlacklistCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<AdDeliveryPlanCityLotBlacklistCU>;
    CITY_ID:FieldUtil<AdDeliveryPlanCityLotBlacklistCU>;
    LOT_ID:FieldUtil<AdDeliveryPlanCityLotBlacklistCU>;
    DEL_FLAG:FieldUtil<AdDeliveryPlanCityLotBlacklistCU>;
}

class AdDeliveryPlanCityLotBlacklistCUImpl extends ConditionUtilImpl<AdDeliveryPlanCityLotBlacklistCUImpl> implements AdDeliveryPlanCityLotBlacklistCU{ 
    newInstance(): AdDeliveryPlanCityLotBlacklistCUImpl {
        return new AdDeliveryPlanCityLotBlacklistCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{  
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','广告投放计划id', this);
    }
    get CITY_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{  
        return new FieldUtil('CITY_ID','cityId','城市id，特殊值0表示所有城市', this);
    }
    get LOT_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{  
        return new FieldUtil('LOT_ID','lotId','车场id，特殊值0，表示所有车场', this);
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{  
        return new FieldUtil('DEL_FLAG','delFlag','是否删除：0，否；1，是', this);
    }
}

@Singleton 
class AdDeliveryPlanCityLotBlacklistMU extends TableUtilImpl<AdDeliveryPlanCityLotBlacklistCU,AdDeliveryPlanCityLotBlacklist>{ 
    tableName  = 'ad_delivery_plan_city_lot_blacklist';
    tableFields  = ['ad_delivery_plan_id','city_id','lot_id','del_flag'];
    modelFields  = ['adDeliveryPlanId','cityId','lotId','delFlag'];
    modelIdFields  = ['adDeliveryPlanId','cityId','lotId'];
    tableIdFields  = ['ad_delivery_plan_id','city_id','lot_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanCityLotBlacklistCU {
        return new AdDeliveryPlanCityLotBlacklistCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','广告投放计划id', new AdDeliveryPlanCityLotBlacklistCUImpl());
    }
    static get CITY_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return new FieldUtil('CITY_ID','cityId','城市id，特殊值0表示所有城市', new AdDeliveryPlanCityLotBlacklistCUImpl());
    }
    static get LOT_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return new FieldUtil('LOT_ID','lotId','车场id，特殊值0，表示所有车场', new AdDeliveryPlanCityLotBlacklistCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return new FieldUtil('DEL_FLAG','delFlag','是否删除：0，否；1，是', new AdDeliveryPlanCityLotBlacklistCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return AdDeliveryPlanCityLotBlacklistMU.AD_DELIVERY_PLAN_ID;
    }
    get CITY_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return AdDeliveryPlanCityLotBlacklistMU.CITY_ID;
    }
    get LOT_ID(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return AdDeliveryPlanCityLotBlacklistMU.LOT_ID;
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanCityLotBlacklistCU>{ 
        return AdDeliveryPlanCityLotBlacklistMU.DEL_FLAG;
    }
}
export {AdDeliveryPlanCityLotBlacklistMU, AdDeliveryPlanCityLotBlacklistCU}
