new StringField('deep_link_code', 'deepLinkCode'
))->
addFlags(new ApiAware()),
(new StringField('affiliate_code', 'affiliateCode'
))->
addFlags(new ApiAware()),
(new StringField('campaign_code', 'campaignCode'
))->
addFlags(new ApiAware()),
(new LongTextField('customer_comment', 'customerComment'
))->
addFlags(new ApiAware()),
(new StringField('source', 'source'
))->
addFlags(new ApiAware()),
(new StateMachineStateField('state_id', 'stateId', OrderStates::STATE_MACHINE
))->
addFlags(new Required()),
(new ManyToOneAssociationField('stateMachineState', 'state_id', StateMachineStateDefinition::
class, 'id',
$autoload))->
addFlags(new ApiAware()),
new ListField('rule_ids', 'ruleIds', StringField::
class),
(new CustomFields())->
addFlags(new ApiAware()),
(new CreatedByField())->
addFlags(new ApiAware()),
(new UpdatedByField())->
addFlags(new ApiAware()),
(new OneToOneAssociationField('orderCustomer', 'id', 'order_id', OrderCustomerDefinition::
class))->
addFlags(new ApiAware(),
new CascadeDelete(),
new SearchRanking(0.5
)),
(new ManyToOneAssociationField('currency', 'currency_id', CurrencyDefinition::
class, 'id', false
))->
addFlags(new ApiAware()),
(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()),
(