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()),
new FkField('requested_customer_group_id', 'requestedGroupId', CustomerGroupDefinition::
class),
new ManyToOneAssociationField('requestedGroup', 'requested_customer_group_id', CustomerGroupDefinition::
class, 'id', false
),
new FkField('bound_sales_channel_id', 'boundSalesChannelId', SalesChannelDefinition::
class),
(new StringField('account_type', 'accountType'
))->
addFlags(new ApiAware(),
new Required()),
new ManyToOneAssociationField('boundSalesChannel', 'bound_sales_channel_id', SalesChannelDefinition::
class, 'id', false
),
(new OneToManyAssociationField('wishlists', CustomerWishlistDefinition::
class, 'customer_id'
))->
addFlags(new CascadeDelete()),
(new CreatedByField([Context::SYSTEM_SCOPE, Context::CRUD_API_SCOPE
]))->
addFlags(new ApiAware()),
(new UpdatedByField([Context::SYSTEM_SCOPE, Context::CRUD_API_SCOPE
]))->
addFlags(new ApiAware()),
new ManyToOneAssociationField('createdBy', 'created_by_id', UserDefinition::
class, 'id', false
),
new ManyToOneAssociationField('updatedBy', 'updated_by_id', UserDefinition::
class, 'id', false
),
]);
return $fields;
}}