new IdField('id', 'id'
))->
addFlags(new ApiAware(),
new PrimaryKey(),
new Required()),
(new FkField('property_group_id', 'groupId', PropertyGroupDefinition::
class))->
addFlags(new ApiAware(),
new Required()),
(new TranslatedField('name'
))->
addFlags(new ApiAware(),
new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING
)),
(new TranslatedField('position'
))->
addFlags(new ApiAware()),
(new StringField('color_hex_code', 'colorHexCode'
))->
addFlags(new ApiAware()),
(new FkField('media_id', 'mediaId', MediaDefinition::
class))->
addFlags(new ApiAware()),
(new TranslatedField('customFields'
))->
addFlags(new ApiAware()),
(new ManyToOneAssociationField('media', 'media_id', MediaDefinition::
class, 'id'
))->
addFlags(new ApiAware()),
(new ManyToOneAssociationField('group', 'property_group_id', PropertyGroupDefinition::
class, 'id'
))->
addFlags(new ApiAware()),
(new TranslationsAssociationField(PropertyGroupOptionTranslationDefinition::
class, 'property_group_option_id'
))->
addFlags(new Required()),
(new OneToManyAssociationField('productConfiguratorSettings', ProductConfiguratorSettingDefinition::
class, 'property_group_option_id', 'id'
))->
addFlags(new RestrictDelete()),
(new ManyToManyAssociationField('productProperties', ProductDefinition::
class, ProductPropertyDefinition::
class, 'property_group_option_id', 'product_id'
))->
addFlags(new CascadeDelete(),
new ReverseInherited('properties'
)),
(new ManyToManyAssociationField('productOptions', ProductDefinition::
class, ProductOptionDefinition::
class, 'property_group_option_id', 'product_id'
))->
addFlags(new RestrictDelete()),
]);
}}