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

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

@Singleton 
class AdDeliveryPlanLotMU extends TableUtilImpl<AdDeliveryPlanLotCU,AdDeliveryPlanLot>{ 
    tableName  = 'ad_delivery_plan_lot';
    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(): AdDeliveryPlanLotCU {
        return new AdDeliveryPlanLotCUImpl();
    }   

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

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