new FloatField('order_total_amount', 'orderTotalAmount'
))->
addFlags(new ApiAware(),
new WriteProtected(Context::SYSTEM_SCOPE
)),
(new IntField('review_count', 'reviewCount'
))->
addFlags(new ApiAware(),
new WriteProtected(Context::SYSTEM_SCOPE
)),
(new CustomFields())->
addFlags(new ApiAware()),
(new StringField('legacy_password', 'legacyPassword'
))->
removeFlag(ApiAware::
class),
(new StringField('legacy_encoder', 'legacyEncoder'
))->
removeFlag(ApiAware::
class),
(new ManyToOneAssociationField('group', 'customer_group_id', CustomerGroupDefinition::
class, 'id', false
))->
addFlags(new ApiAware()),
(new ManyToOneAssociationField('defaultPaymentMethod', 'default_payment_method_id', PaymentMethodDefinition::
class, 'id', false
))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
new ManyToOneAssociationField('salesChannel', 'sales_channel_id', SalesChannelDefinition::
class, 'id', false
),
(new ManyToOneAssociationField('language', 'language_id', LanguageDefinition::
class, 'id', false
))->
addFlags(new ApiAware()),
(new ManyToOneAssociationField('lastPaymentMethod', 'last_payment_method_id', PaymentMethodDefinition::
class, 'id', false
))->
addFlags(new ApiAware()),
(new ManyToOneAssociationField('defaultBillingAddress', 'default_billing_address_id', CustomerAddressDefinition::
class, 'id', false
))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
(new ManyToOneAssociationField('activeBillingAddress', 'active_billing_address_id', CustomerAddressDefinition::
class, 'id', false
))->
addFlags(new ApiAware(SalesChannelApiSource::
class),
new Runtime()),
(new ManyToOneAssociationField('defaultShippingAddress', 'default_shipping_address_id', CustomerAddressDefinition::
class, 'id', false
))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
(new ManyToOneAssociationField('activeShippingAddress', 'active_shipping_address_id', CustomerAddressDefinition::
class, 'id', false
))->
addFlags(new ApiAware(SalesChannelApiSource::
class),
new Runtime()),
(new ManyToOneAssociationField('salutation', 'salutation_id', SalutationDefinition::
class, 'id', false
))->
addFlags(new ApiAware()),
(new OneToManyAssociationField('addresses', CustomerAddressDefinition::
class, 'customer_id', 'id'
))->
addFlags(new ApiAware(),
new CascadeDelete()),
(new OneToManyAssociationField('orderCustomers', OrderCustomerDefinition::
class, 'customer_id', 'id'
))->
addFlags(new SetNullOnDelete()),
(new ManyToManyAssociationField('tags', TagDefinition::
class, CustomerTagDefinition::
class, 'customer_id', 'tag_id'
))->
addFlags(new SearchRanking(SearchRanking::ASSOCIATION_SEARCH_RANKING
)),
new ManyToManyAssociationField('promotions', PromotionDefinition::
class, PromotionPersonaCustomerDefinition::
class, 'customer_id', 'promotion_id'
),
new OneToManyAssociationField('productReviews', ProductReviewDefinition::
class, 'customer_id'
),
new OneToOneAssociationField('recoveryCustomer', 'id', 'customer_id', CustomerRecoveryDefinition::
class, false
),
new RemoteAddressField('remote_address', 'remoteAddress'
),
(new ManyToManyIdField('tag_ids', 'tagIds', 'tags'
))->
addFlags(new ApiAware()),