new OneToManyAssociationField('conditions', RuleConditionDefinition::
class, 'rule_id', 'id'
))->
addFlags(new CascadeDelete()),
// Reverse Associations not available in sales-channel-api
(new OneToManyAssociationField('productPrices', ProductPriceDefinition::
class, 'rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PRODUCT_AREA
)),
(new OneToManyAssociationField('shippingMethodPrices', ShippingMethodPriceDefinition::
class, 'rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::SHIPPING_AREA
)),
(new OneToManyAssociationField('shippingMethodPriceCalculations', ShippingMethodPriceDefinition::
class, 'calculation_rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::SHIPPING_AREA
)),
(new OneToManyAssociationField('shippingMethods', ShippingMethodDefinition::
class, 'availability_rule_id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::SHIPPING_AREA
)),
(new OneToManyAssociationField('paymentMethods', PaymentMethodDefinition::
class, 'availability_rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PAYMENT_AREA
)),
(new OneToManyAssociationField('personaPromotions', PromotionDefinition::
class, 'persona_rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PROMOTION_AREA
)),
(new OneToManyAssociationField('flowSequences', FlowSequenceDefinition::
class, 'rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::FLOW_AREA
)),
(new OneToManyAssociationField('taxProviders', TaxProviderDefinition::
class, 'availability_rule_id', 'id'
))->
addFlags(new RestrictDelete(),
new Since('6.5.0.0'
)),
new ManyToManyAssociationField('tags', TagDefinition::
class, RuleTagDefinition::
class, 'rule_id', 'tag_id'
),
// Promotion References
(new ManyToManyAssociationField('personaPromotions', PromotionDefinition::
class, PromotionPersonaRuleDefinition::
class, 'rule_id', 'promotion_id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PROMOTION_AREA
)),
(new ManyToManyAssociationField('orderPromotions', PromotionDefinition::
class, PromotionOrderRuleDefinition::
class, 'rule_id', 'promotion_id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PROMOTION_AREA
)),
(new ManyToManyAssociationField('cartPromotions', PromotionDefinition::
class, PromotionCartRuleDefinition::
class, 'rule_id', 'promotion_id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PROMOTION_AREA
)),
(new ManyToManyAssociationField('promotionDiscounts', PromotionDiscountDefinition::
class, PromotionDiscountRuleDefinition::
class, 'rule_id', 'discount_id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PROMOTION_AREA
)),
(new ManyToManyAssociationField('promotionSetGroups', PromotionSetGroupDefinition::
class, PromotionSetGroupRuleDefinition::
class, 'rule_id', 'setgroup_id'
))->
addFlags(new RestrictDelete(),
new RuleAreas(RuleAreas::PROMOTION_AREA
)),
]);
}}