mirror of
https://github.com/strapi/strapi.git
synced 2026-02-06 15:27:41 +00:00
123 lines
2.5 KiB
JSON
Executable File
123 lines
2.5 KiB
JSON
Executable File
{
|
|
"kind": "collectionType",
|
|
"collectionName": "restaurants",
|
|
"info": {
|
|
"displayName": "Restaurant",
|
|
"singularName": "restaurant",
|
|
"pluralName": "restaurants",
|
|
"description": ""
|
|
},
|
|
"options": {
|
|
"draftAndPublish": true,
|
|
"comment": ""
|
|
},
|
|
"pluginOptions": {},
|
|
"attributes": {
|
|
"name": {
|
|
"maxLength": 50,
|
|
"required": true,
|
|
"minLength": 5,
|
|
"type": "string",
|
|
"pluginOptions": {}
|
|
},
|
|
"slug": {
|
|
"type": "uid",
|
|
"targetField": "name",
|
|
"pluginOptions": {}
|
|
},
|
|
"price_range": {
|
|
"enum": ["very_cheap", "cheap", "average", "expensive", "very_expensive"],
|
|
"type": "enumeration",
|
|
"pluginOptions": {}
|
|
},
|
|
"closing_period": {
|
|
"component": "default.closingperiod",
|
|
"type": "component",
|
|
"pluginOptions": {}
|
|
},
|
|
"contact_email": {
|
|
"type": "email",
|
|
"pluginOptions": {}
|
|
},
|
|
"stars": {
|
|
"required": true,
|
|
"type": "integer",
|
|
"min": 0,
|
|
"max": 3
|
|
},
|
|
"averagePrice": {
|
|
"type": "float",
|
|
"min": 0,
|
|
"max": 35.12
|
|
},
|
|
"address": {
|
|
"type": "relation",
|
|
"relation": "oneToOne",
|
|
"target": "api::address.address"
|
|
},
|
|
"cover": {
|
|
"type": "media",
|
|
"multiple": false,
|
|
"required": false
|
|
},
|
|
"timestamp": {
|
|
"type": "timestamp"
|
|
},
|
|
"images": {
|
|
"type": "media",
|
|
"multiple": true,
|
|
"required": false
|
|
},
|
|
"short_description": {
|
|
"type": "text",
|
|
"pluginOptions": {}
|
|
},
|
|
"since": {
|
|
"type": "date",
|
|
"pluginOptions": {}
|
|
},
|
|
"categories": {
|
|
"type": "relation",
|
|
"relation": "oneToMany",
|
|
"target": "api::category.category"
|
|
},
|
|
"description": {
|
|
"type": "richtext",
|
|
"required": true,
|
|
"minLength": 10,
|
|
"pluginOptions": {}
|
|
},
|
|
"services": {
|
|
"component": "default.restaurantservice",
|
|
"repeatable": true,
|
|
"type": "component",
|
|
"max": 1,
|
|
"pluginOptions": {}
|
|
},
|
|
"menu": {
|
|
"type": "relation",
|
|
"relation": "oneToOne",
|
|
"target": "api::menu.menu",
|
|
"inversedBy": "restaurant"
|
|
},
|
|
"opening_times": {
|
|
"component": "default.openingtimes",
|
|
"type": "component",
|
|
"repeatable": true,
|
|
"min": 1,
|
|
"max": 10,
|
|
"pluginOptions": {}
|
|
},
|
|
"dz": {
|
|
"type": "dynamiczone",
|
|
"components": [
|
|
"default.openingtimes",
|
|
"default.restaurantservice",
|
|
"default.closingperiod",
|
|
"default.dish"
|
|
],
|
|
"pluginOptions": {}
|
|
}
|
|
}
|
|
}
|