strapi/examples/getstarted/api/restaurant/models/Restaurant.settings.json

104 lines
2.0 KiB
JSON
Raw Normal View History

2019-08-22 14:10:45 +02:00
{
"collectionName": "restaurants",
"info": {
"name": "restaurant",
"description": ""
},
"options": {
"increments": true,
"timestamps": ["created_at", "updated_at"],
2019-08-22 14:10:45 +02:00
"comment": ""
},
"attributes": {
"name": {
"maxLength": 50,
"required": true,
"minLength": 5,
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "name"
},
2019-12-05 18:41:04 +01:00
"price_range": {
"enum": ["very_cheap", "cheap", "average", "expensive", "very_expensive"],
2019-12-05 18:41:04 +01:00
"type": "enumeration"
},
"closing_period": {
"component": "default.closingperiod",
"type": "component"
2019-10-29 19:26:42 +01:00
},
"contact_email": {
"type": "email"
},
"stars": {
"required": true,
"type": "integer",
"min": 0,
"max": 3
},
"averagePrice": {
"type": "float",
"min": 0,
"max": 35.12
},
2019-12-05 18:41:04 +01:00
"address": {
"model": "address"
},
2019-08-21 11:05:33 +02:00
"cover": {
"model": "file",
"via": "related",
2019-12-05 18:41:04 +01:00
"plugin": "upload",
"required": false
2019-08-21 11:05:33 +02:00
},
"timestamp": {
"type": "timestamp"
},
"images": {
"collection": "file",
"via": "related",
2019-12-05 18:41:04 +01:00
"plugin": "upload",
"required": false
},
2019-12-05 18:41:04 +01:00
"short_description": {
"type": "text"
},
"since": {
"type": "date"
2019-08-22 14:10:45 +02:00
},
"categories": {
"collection": "category"
},
"description": {
"type": "richtext",
"required": true,
"minLength": 10
2019-08-22 14:10:45 +02:00
},
2019-12-05 18:41:04 +01:00
"services": {
"component": "default.restaurantservice",
"repeatable": true,
"type": "component"
},
"menu": {
"model": "menu",
"via": "restaurant"
},
2019-08-22 14:10:45 +02:00
"opening_times": {
"component": "default.openingtimes",
2019-10-22 18:01:03 +02:00
"type": "component",
2019-08-22 14:10:45 +02:00
"repeatable": true,
"min": 1,
"max": 10
},
2019-12-05 18:41:04 +01:00
"dz": {
"type": "dynamiczone",
2019-12-09 22:39:50 +01:00
"components": [
"default.openingtimes",
"default.restaurantservice",
"default.closingperiod",
"default.dish"
2019-12-09 22:39:50 +01:00
]
2019-08-22 14:10:45 +02:00
}
}
2019-11-06 16:29:19 +01:00
}