new ManyToOneAssociationField('language', 'language_id', LanguageDefinition::
class, 'id', false
))->
addFlags(new ApiAware()),
new ManyToOneAssociationField('salesChannel', 'sales_channel_id', SalesChannelDefinition::
class, 'id', false
),
(new OneToManyAssociationField('addresses', OrderAddressDefinition::
class, 'order_id'
))->
addFlags(new ApiAware(),
new CascadeDelete(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
(new ManyToOneAssociationField('billingAddress', 'billing_address_id', OrderAddressDefinition::
class))->
addFlags(new ApiAware()),
(new OneToManyAssociationField('deliveries', OrderDeliveryDefinition::
class, 'order_id'
))->
addFlags(new ApiAware(),
new CascadeDelete(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
(new OneToManyAssociationField('lineItems', OrderLineItemDefinition::
class, 'order_id'
))->
addFlags(new ApiAware(),
new CascadeDelete()),
(new OneToManyAssociationField('transactions', OrderTransactionDefinition::
class, 'order_id'
))->
addFlags(new ApiAware(),
new CascadeDelete()),
(new OneToManyAssociationField('documents', DocumentDefinition::
class, 'order_id'
))->
addFlags(new ApiAware()),
(new ManyToManyAssociationField('tags', TagDefinition::
class, OrderTagDefinition::
class, 'order_id', 'tag_id'
))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
new ManyToOneAssociationField('createdBy', 'created_by_id', UserDefinition::
class, 'id', false
),
new ManyToOneAssociationField('updatedBy', 'updated_by_id', UserDefinition::
class, 'id', false
),
(new CashRoundingConfigField('item_rounding', 'itemRounding'
))->
addFlags(new Required()),
(new CashRoundingConfigField('total_rounding', 'totalRounding'
))->
addFlags(new Required()),
]);
}}