Dynamic field explanation:
dynamic_field attribute for LotModel depends on the selected category. Information about dynamic_field is written in the dynamic_fields_template attribute. So
when you select the category for a lot it should display dynamic fields from it for a specific lot. Each field contains its respective label and rules string which tells
whether it is required or not.
Example
Category:
[
{
"uuid": "uuid_1",
"name": {
"en": "Coins"
},
"dynamic_fields_template": {
"title": {
"type": "text",
"label": "Title",
"rules": {
"required": true
}
},
"description": {
"type": "text",
"label": "Title",
"rules": {
"required": false
}
}
}
},
{
"uuid": "uuid2",
"name": {
"en": "Stamps"
},
"dynamic_fields_template": {
"year": {
"label": "Year",
"rules": {
"required": true
}
},
"creator": {
"label": "Creator",
"rules": null
}
}
}
]
In this case, If the requested lot has:
- Category with uuid_1: dynamic_fields are title and description.
- Category with uuid_2: dynamic_fields are year and creator.
Lots
[
{
"category_uuid": "uuid1",
"dynamic_fields": {
"en": {
"title": "title text",
"description": "description text"
}
}
},
{
"category_uuid": "uuid2",
"dynamic_fields": {
"en": {
"year": 1999,
"creator": null
}
}
}
]