new ReferenceVersionField(OrderAddressDefinition::
class, 'shipping_order_address_version_id'
))->
addFlags(new ApiAware(),
new Required()),
(new FkField('shipping_method_id', 'shippingMethodId', ShippingMethodDefinition::
class))->
addFlags(new ApiAware(),
new Required()),
(new StateMachineStateField('state_id', 'stateId', OrderDeliveryStates::STATE_MACHINE
))->
addFlags(new ApiAware(),
new Required()),
(new ManyToOneAssociationField('stateMachineState', 'state_id', StateMachineStateDefinition::
class, 'id',
$autoload))->
addFlags(new ApiAware()),
(new ListField('tracking_codes', 'trackingCodes', StringField::
class))->
addFlags(new ApiAware(),
new Required(),
new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING
)),
(new DateTimeField('shipping_date_earliest', 'shippingDateEarliest'
))->
addFlags(new ApiAware(),
new Required(),
new SearchRanking(SearchRanking::MIDDLE_SEARCH_RANKING
)),
(new DateTimeField('shipping_date_latest', 'shippingDateLatest'
))->
addFlags(new ApiAware(),
new Required(),
new SearchRanking(SearchRanking::MIDDLE_SEARCH_RANKING
)),
(new CalculatedPriceField('shipping_costs', 'shippingCosts'
))->
addFlags(new ApiAware()),
(new CustomFields())->
addFlags(new ApiAware()),
new ManyToOneAssociationField('order', 'order_id', OrderDefinition::
class, 'id', false
),
(new ManyToOneAssociationField('shippingOrderAddress', 'shipping_order_address_id', OrderAddressDefinition::
class, 'id',
$autoload))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
(new ManyToOneAssociationField('shippingMethod', 'shipping_method_id', ShippingMethodDefinition::
class, 'id'
))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
(new OneToManyAssociationField('positions', OrderDeliveryPositionDefinition::
class, 'order_delivery_id', 'id'
))->
addFlags(new ApiAware(),
new CascadeDelete(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
]);
}}