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

class AdDeliveryPlanLotBlacklistCUImpl extends ConditionUtilImpl<AdDeliveryPlanLotBlacklistCUImpl> implements AdDeliveryPlanLotBlacklistCU{ 
    newInstance(): AdDeliveryPlanLotBlacklistCUImpl {
        return new AdDeliveryPlanLotBlacklistCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{  
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','广告投放计划id', this);
    }
    get LOT_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{  
        return new FieldUtil('lot_id','lotId','车场id', this);
    }
    get CITY_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{  
        return new FieldUtil('city_id','cityId','城市id', this);
    }
    get PROV_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{  
        return new FieldUtil('prov_id','provId','', this);
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{  
        return new FieldUtil('del_flag','delFlag','是否删除：0，否；1，是', this);
    }
}

@Singleton 
class AdDeliveryPlanLotBlacklistMU extends TableUtilImpl<AdDeliveryPlanLotBlacklistCU,AdDeliveryPlanLotBlacklist>{ 
    tableName  = 'ad_delivery_plan_lot_blacklist';
    tableFields  = ['ad_delivery_plan_id','lot_id','city_id','prov_id','del_flag'];
    modelFields  = ['adDeliveryPlanId','lotId','cityId','provId','delFlag'];
    modelIdFields  = ['adDeliveryPlanId','lotId'];
    tableIdFields  = ['ad_delivery_plan_id','lot_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanLotBlacklistCU {
        return new AdDeliveryPlanLotBlacklistCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','广告投放计划id', new AdDeliveryPlanLotBlacklistCUImpl());
    }
    static get LOT_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return new FieldUtil('lot_id','lotId','车场id', new AdDeliveryPlanLotBlacklistCUImpl());
    }
    static get CITY_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return new FieldUtil('city_id','cityId','城市id', new AdDeliveryPlanLotBlacklistCUImpl());
    }
    static get PROV_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return new FieldUtil('prov_id','provId','', new AdDeliveryPlanLotBlacklistCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return new FieldUtil('del_flag','delFlag','是否删除：0，否；1，是', new AdDeliveryPlanLotBlacklistCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return AdDeliveryPlanLotBlacklistMU.AD_DELIVERY_PLAN_ID;
    }
    get LOT_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return AdDeliveryPlanLotBlacklistMU.LOT_ID;
    }
    get CITY_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return AdDeliveryPlanLotBlacklistMU.CITY_ID;
    }
    get PROV_ID(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return AdDeliveryPlanLotBlacklistMU.PROV_ID;
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanLotBlacklistCU>{ 
        return AdDeliveryPlanLotBlacklistMU.DEL_FLAG;
    }
}
export {AdDeliveryPlanLotBlacklistMU, AdDeliveryPlanLotBlacklistCU}
