strapi/examples/getstarted/api/restaurant/models/Restaurant.settings.json
soupette f3da9beacd Remove old notification API
Signed-off-by: soupette <cyril.lpz@gmail.com>
2021-05-17 11:31:19 +02:00

167 lines
3.1 KiB
JSON
Executable File

{
"kind": "collectionType",
"collectionName": "restaurants",
"info": {
"name": "restaurant",
"description": ""
},
"options": {
"draftAndPublish": true,
"increments": true,
"timestamps": ["created_at", "updated_at"],
"comment": ""
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"name": {
"maxLength": 50,
"required": true,
"minLength": 5,
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"slug": {
"type": "uid",
"targetField": "name",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"price_range": {
"enum": ["very_cheap", "cheap", "average", "expensive", "very_expensive"],
"type": "enumeration",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"closing_period": {
"component": "default.closingperiod",
"type": "component",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"contact_email": {
"type": "email",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"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",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"since": {
"type": "date",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"categories": {
"collection": "category"
},
"description": {
"type": "richtext",
"required": true,
"minLength": 10,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"services": {
"component": "default.restaurantservice",
"repeatable": true,
"type": "component",
"max": 1,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"menu": {
"model": "menu",
"via": "restaurant"
},
"opening_times": {
"component": "default.openingtimes",
"type": "component",
"repeatable": true,
"min": 1,
"max": 10,
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"dz": {
"type": "dynamiczone",
"components": [
"default.openingtimes",
"default.restaurantservice",
"default.closingperiod",
"default.dish"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
}
}
}