new DateTimeField('first_login', 'firstLogin'
))->
addFlags(new ApiAware()),
(new DateTimeField('last_login', 'lastLogin'
))->
addFlags(new ApiAware()),
(new JsonField('newsletter_sales_channel_ids', 'newsletterSalesChannelIds'
))->
addFlags(new WriteProtected(Context::SYSTEM_SCOPE
))->
removeFlag(ApiAware::
class),
(new DateField('birthday', 'birthday'
))->
addFlags(new ApiAware()),
(new DateTimeField('last_order_date', 'lastOrderDate'
))->
addFlags(new ApiAware(),
new WriteProtected(Context::SYSTEM_SCOPE
)),
(new IntField('order_count', 'orderCount'
))->
addFlags(new ApiAware(),
new WriteProtected(Context::SYSTEM_SCOPE
)),
(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()),
(