import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdDeliveryPlanCity } from '../models/index' 
/**
 * @author auto generate
 * @version 1.1
 * @date 2021-05-31 16:49
 */
interface AdDeliveryPlanCityCU extends ConditionUtil<AdDeliveryPlanCityCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<AdDeliveryPlanCityCU>;
    CITY_ID:FieldUtil<AdDeliveryPlanCityCU>;
    PROV_ID:FieldUtil<AdDeliveryPlanCityCU>;
    DEL_FLAG:FieldUtil<AdDeliveryPlanCityCU>;
}

class AdDeliveryPlanCityCUImpl extends ConditionUtilImpl<AdDeliveryPlanCityCUImpl> implements AdDeliveryPlanCityCU{ 
    newInstance(): AdDeliveryPlanCityCUImpl {
        return new AdDeliveryPlanCityCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanCityCU>{  
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','投放计划id', this);
    }
    get CITY_ID(): FieldUtil<AdDeliveryPlanCityCU>{  
        return new FieldUtil('city_id','cityId','城市id', this);
    }
    get PROV_ID(): FieldUtil<AdDeliveryPlanCityCU>{  
        return new FieldUtil('prov_id','provId','省份id', this);
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanCityCU>{  
        return new FieldUtil('del_flag','delFlag','是否删除', this);
    }
}

@Singleton 
class AdDeliveryPlanCityMU extends TableUtilImpl<AdDeliveryPlanCityCU,AdDeliveryPlanCity>{ 
    tableName  = 'ad_delivery_plan_city';
    tableFields  = ['ad_delivery_plan_id','city_id','prov_id','del_flag'];
    modelFields  = ['adDeliveryPlanId','cityId','provId','delFlag'];
    modelIdFields  = ['adDeliveryPlanId','cityId'];
    tableIdFields  = ['ad_delivery_plan_id','city_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanCityCU {
        return new AdDeliveryPlanCityCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','投放计划id', new AdDeliveryPlanCityCUImpl());
    }
    static get CITY_ID(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return new FieldUtil('city_id','cityId','城市id', new AdDeliveryPlanCityCUImpl());
    }
    static get PROV_ID(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return new FieldUtil('prov_id','provId','省份id', new AdDeliveryPlanCityCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return new FieldUtil('del_flag','delFlag','是否删除', new AdDeliveryPlanCityCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return AdDeliveryPlanCityMU.AD_DELIVERY_PLAN_ID;
    }
    get CITY_ID(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return AdDeliveryPlanCityMU.CITY_ID;
    }
    get PROV_ID(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return AdDeliveryPlanCityMU.PROV_ID;
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanCityCU>{ 
        return AdDeliveryPlanCityMU.DEL_FLAG;
    }
}
export {AdDeliveryPlanCityMU, AdDeliveryPlanCityCU}
