<commit_before>The Object Model
================

Here is a quick reference of what the default models can do for you.

Product
-------

By default product is represented with `name`, and `description`. Thee is a `slug` which is auto-populated using doctrine sluggable extension,
and can be used to generate seo friendly routes. Date `availableOn` can be used to control when particular product will become visible.
There are also metadata `metaKeywords`, `metaDescription` and dates `createdAt`, `updatedAt`, `deletedAt` auto populated using doctrine timestampable extension.

CustomizableProduct
-------------------

Products can have variants with different colors, styles, sizes, or combination of more such options.
`CustomizableProduct` provides access to 3 collections: `variants`, `options` and `properties`.
Each of this represents a collection of objects described below, and turns product into pretty flexible structure.
Speaking of variants, `CustomizableProduct` have ``->getMasterVariant()`` method which gets default variant from variants
collection. Each product have one master variant.

Variant
-------

Products that can have different sizes, styles, colors, and so on, can be modeled as variants of the product.
A product can have zero or more variants. Variant have `master` flag which defines it as master (default) variant, `sku` - stock-keeping unit,
`presentation` string, reerence to product, collection of options, and dates similar to `Product`.

Property and ProductProperty
----------------------------

Property is represented with `name`, and `presentation`. Name is internal name and can be used in backend to identify property, while presentation
can be used in front. There are several property types: boolean, string, number and choice.
Property is applied to product using `ProductProperty` model, which references `Property`, `Product` and gives access to actual property value.<commit_msg>Update models.rst<commit_after>The Object Model
================

Here is a quick reference of what the default models can do for you.

Product
-------

By default product is represented with `name`, and `description`. There is a `slug` which is auto-populated using doctrine sluggable extension,
and can be used to generate seo friendly routes. Date `availableOn` can be used to control when a particular product will become visible.
There are also metadata `metaKeywords`, `metaDescription` and dates `createdAt`, `updatedAt`, `deletedAt` auto populated using doctrine timestampable extension.

CustomizableProduct
-------------------

Products can have variants with different colors, styles, sizes, or combination of more such options.
`CustomizableProduct` provides access to 3 collections: `variants`, `options` and `properties`.
Each of this represents a collection of objects described below, and turns product into pretty flexible structure.
Speaking of variants, `CustomizableProduct` have ``->getMasterVariant()`` method which gets default variant from variants
collection. Each product have one master variant.

Variant
-------

Products that can have different sizes, styles, colors, and so on, can be modeled as variants of the product.
A product can have zero or more variants. Variant have `master` flag which defines it as master (default) variant, `sku` - stock-keeping unit,
`presentation` string, reerence to product, collection of options, and dates similar to `Product`.

Property and ProductProperty
----------------------------

Property is represented with `name`, and `presentation`. Name is internal name and can be used in backend to identify property, while presentation
can be used in front. There are several property types: boolean, string, number and choice.
Property is applied to product using `ProductProperty` model, which references `Property`, `Product` and gives access to actual property value.
{'fraction_non_alphanumeric': 0.09552161532487703, 'fraction_numerical': 0.0005177323323841574, 'mean_word_length': 4.488636363636363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1677390', 'n_tokens_mistral': 868, 'n_tokens_neox': 844, 'n_words': 509}