strapi/examples/getstarted/api/restaurant/models/Restaurant.settings.json
Alexandre Bodin cc9d23c3ac Merge branch 'develop' into features/media-lib
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-07 20:24:39 +02:00

104 lines
2.0 KiB
JSON
Executable File

{
"collectionName": "restaurants",
"info": {
"name": "restaurant",
"description": ""
},
"options": {
"increments": true,
"timestamps": ["created_at", "updated_at"],
"comment": ""
},
"attributes": {
"name": {
"maxLength": 50,
"required": true,
"minLength": 5,
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "name"
},
"price_range": {
"enum": ["very_cheap", "cheap", "average", "expensive", "very_expensive"],
"type": "enumeration"
},
"closing_period": {
"component": "default.closingperiod",
"type": "component"
},
"contact_email": {
"type": "email"
},
"stars": {
"required": true,
"type": "integer",
"min": 0,
"max": 3
},
"averagePrice": {
"type": "float",
"min": 0,
"max": 35.12
},
"address": {
"model": "address"
},
"cover": {
"model": "file",
"via": "related",
"plugin": "upload",
"required": false
},
"timestamp": {
"type": "timestamp"
},
"images": {
"collection": "file",
"via": "related",
"plugin": "upload",
"required": false
},
"short_description": {
"type": "text"
},
"since": {
"type": "date"
},
"categories": {
"collection": "category"
},
"description": {
"type": "richtext",
"required": true,
"minLength": 10
},
"services": {
"component": "default.restaurantservice",
"repeatable": true,
"type": "component"
},
"menu": {
"model": "menu",
"via": "restaurant"
},
"opening_times": {
"component": "default.openingtimes",
"type": "component",
"repeatable": true,
"min": 1,
"max": 10
},
"dz": {
"type": "dynamiczone",
"components": [
"default.openingtimes",
"default.restaurantservice",
"default.closingperiod",
"default.dish"
]
}
}
}