import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdDeliveryPlanPositionMaterial } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-28 12:57
 */
interface AdDeliveryPlanPositionMaterialCU extends ConditionUtil<AdDeliveryPlanPositionMaterialCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<AdDeliveryPlanPositionMaterialCU>;
    AD_POSITION_ID:FieldUtil<AdDeliveryPlanPositionMaterialCU>;
    AD_MATERIAL_ID:FieldUtil<AdDeliveryPlanPositionMaterialCU>;
    AD_STYLE_ID:FieldUtil<AdDeliveryPlanPositionMaterialCU>;
    DEL_FLAG:FieldUtil<AdDeliveryPlanPositionMaterialCU>;
}

class AdDeliveryPlanPositionMaterialCUImpl extends ConditionUtilImpl<AdDeliveryPlanPositionMaterialCUImpl> implements AdDeliveryPlanPositionMaterialCU{ 
    newInstance(): AdDeliveryPlanPositionMaterialCUImpl {
        return new AdDeliveryPlanPositionMaterialCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{  
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','投放计划id', this);
    }
    get AD_POSITION_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{  
        return new FieldUtil('AD_POSITION_ID','adPositionId','广告位id', this);
    }
    get AD_MATERIAL_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{  
        return new FieldUtil('AD_MATERIAL_ID','adMaterialId','素材id', this);
    }
    get AD_STYLE_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{  
        return new FieldUtil('AD_STYLE_ID','adStyleId','样式id', this);
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{  
        return new FieldUtil('DEL_FLAG','delFlag','是否删除：0，否；1，是', this);
    }
}

@Singleton 
class AdDeliveryPlanPositionMaterialMU extends TableUtilImpl<AdDeliveryPlanPositionMaterialCU,AdDeliveryPlanPositionMaterial>{ 
    tableName  = 'ad_delivery_plan_position_material';
    tableFields  = ['ad_delivery_plan_id','ad_position_id','ad_material_id','ad_style_id','del_flag'];
    modelFields  = ['adDeliveryPlanId','adPositionId','adMaterialId','adStyleId','delFlag'];
    modelIdFields  = ['adDeliveryPlanId','adPositionId','adMaterialId'];
    tableIdFields  = ['ad_delivery_plan_id','ad_position_id','ad_material_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanPositionMaterialCU {
        return new AdDeliveryPlanPositionMaterialCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','投放计划id', new AdDeliveryPlanPositionMaterialCUImpl());
    }
    static get AD_POSITION_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return new FieldUtil('AD_POSITION_ID','adPositionId','广告位id', new AdDeliveryPlanPositionMaterialCUImpl());
    }
    static get AD_MATERIAL_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return new FieldUtil('AD_MATERIAL_ID','adMaterialId','素材id', new AdDeliveryPlanPositionMaterialCUImpl());
    }
    static get AD_STYLE_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return new FieldUtil('AD_STYLE_ID','adStyleId','样式id', new AdDeliveryPlanPositionMaterialCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return new FieldUtil('DEL_FLAG','delFlag','是否删除：0，否；1，是', new AdDeliveryPlanPositionMaterialCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return AdDeliveryPlanPositionMaterialMU.AD_DELIVERY_PLAN_ID;
    }
    get AD_POSITION_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return AdDeliveryPlanPositionMaterialMU.AD_POSITION_ID;
    }
    get AD_MATERIAL_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return AdDeliveryPlanPositionMaterialMU.AD_MATERIAL_ID;
    }
    get AD_STYLE_ID(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return AdDeliveryPlanPositionMaterialMU.AD_STYLE_ID;
    }
    get DEL_FLAG(): FieldUtil<AdDeliveryPlanPositionMaterialCU>{ 
        return AdDeliveryPlanPositionMaterialMU.DEL_FLAG;
    }
}
export {AdDeliveryPlanPositionMaterialMU, AdDeliveryPlanPositionMaterialCU}
