Model rooms
Permissions
User Group | Create? | Read? | Update? | Delete? |
---|
setup | x | x | x | x |
admin | | x | | |
user | | x | | |
Fields
Name | Type | Link | Maps To | Default | Indexed? | Unique? |
---|
__v | Number | | | | | |
_deleted | Boolean | | | false | x | |
_id | ObjectID | | | function defaultId() {
return new oid();
} | | |
_owner_id | ObjectID | User | _owner | | x | |
_updated_by_id | ObjectID | User | _updated_by | | x | |
aesthetic | String | | | | | |
aesthetic_impact | Number | | | | | |
bookableitemtype_id | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
capacity | Number | | | | | |
cost | Number | | | | | |
createdAt | Date | | | | | |
description | String | | | | | |
external_ical | String | | | | | |
full_day_discount | Number | | | | | |
half_day_discount | Number | | | | | |
img | String | | | | | |
location_id | ObjectID | Location | | | x | |
meters_squared | Number | | | | | |
name | String | | | | | |
number_available | Number | | | 1 | | |
off_peak_cost | Number | | | | | |
organisation_id | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
price_per_day | Number | | | | | |
price_per_room | Number | | | | | |
price_per_user_per_day | Number | | | | | |
private | Boolean | | | false | | |
product_id | ObjectID | Product | | | | |
safety_margin | Number | | | | | |
start_price_per_square_meter | Number | | | | | |
type | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
unavailable_reason | String | | | | | |
updatedAt | Date | | | | | |
urlid | String | | | | x | |
Raw definition
{
"path": "__v",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"__v"
],
"options": {},
"_index": null
}
{
"path": "_deleted",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_deleted"
],
"options": {
"default": false,
"index": true
},
"_index": true,
"defaultValue": false
}
{
"path": "_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"_id"
],
"options": {
"auto": true,
"type": "ObjectId"
},
"_index": null
}
{
"path": "_owner_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_owner_id"
],
"options": {
"link": "User",
"map_to": "_owner",
"index": true
},
"_index": true
}
{
"path": "_updated_by_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_updated_by_id"
],
"options": {
"link": "User",
"map_to": "_updated_by",
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "aesthetic",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"aesthetic"
],
"options": {},
"_index": null
}
{
"path": "aesthetic_impact",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"aesthetic_impact"
],
"options": {},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"setup": "crud",
"admin": "r",
"user": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "r",
"owner": "",
"user": "r",
"all": "",
"setup": "crud"
},
"pluralization": true
},
"caster": {
"path": "bookableitemtype_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"bookableitemtype_id"
],
"options": {
"link": "bookableitemtype",
"index": true
},
"_index": true,
"_arrayPath": "bookableitemtype_id.$",
"_arrayParentPath": "bookableitemtype_id"
},
"$embeddedSchemaType": {
"path": "bookableitemtype_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"bookableitemtype_id"
],
"options": {
"link": "bookableitemtype",
"index": true
},
"_index": true,
"_arrayPath": "bookableitemtype_id.$",
"_arrayParentPath": "bookableitemtype_id"
},
"$isMongooseArray": true,
"path": "bookableitemtype_id",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"bookableitemtype_id"
],
"options": {
"type": [
{
"link": "bookableitemtype",
"index": true
}
]
},
"_index": null
}
{
"path": "capacity",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"capacity"
],
"options": {},
"_index": null
}
{
"path": "cost",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"cost"
],
"options": {},
"_index": null
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true
}
{
"enumValues": [],
"regExp": null,
"path": "description",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"description"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "external_ical",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"external_ical"
],
"options": {},
"_index": null
}
{
"path": "full_day_discount",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"full_day_discount"
],
"options": {},
"_index": null
}
{
"path": "half_day_discount",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"half_day_discount"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "img",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"img"
],
"options": {},
"_index": null
}
{
"path": "location_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location",
"index": true
},
"_index": true
}
{
"path": "meters_squared",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"meters_squared"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "name",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"name"
],
"options": {},
"_index": null
}
{
"path": "number_available",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"number_available"
],
"options": {
"default": 1
},
"_index": null,
"defaultValue": 1
}
{
"path": "off_peak_cost",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"off_peak_cost"
],
"options": {},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"setup": "crud",
"admin": "r",
"user": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "r",
"owner": "",
"user": "r",
"all": "",
"setup": "crud"
},
"pluralization": true
},
"caster": {
"path": "organisation_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation_id"
],
"options": {
"link": "Organisation"
},
"_index": null,
"_arrayPath": "organisation_id.$",
"_arrayParentPath": "organisation_id"
},
"$embeddedSchemaType": {
"path": "organisation_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation_id"
],
"options": {
"link": "Organisation"
},
"_index": null,
"_arrayPath": "organisation_id.$",
"_arrayParentPath": "organisation_id"
},
"$isMongooseArray": true,
"path": "organisation_id",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation_id"
],
"options": {
"type": [
{
"link": "Organisation"
}
]
},
"_index": null
}
{
"path": "price_per_day",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"price_per_day"
],
"options": {},
"_index": null
}
{
"path": "price_per_room",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"price_per_room"
],
"options": {},
"_index": null
}
{
"path": "price_per_user_per_day",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"price_per_user_per_day"
],
"options": {},
"_index": null
}
{
"path": "private",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"private"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"path": "product_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"product_id"
],
"options": {
"link": "Product"
},
"_index": null
}
{
"path": "safety_margin",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"safety_margin"
],
"options": {},
"_index": null
}
{
"path": "start_price_per_square_meter",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"start_price_per_square_meter"
],
"options": {},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"setup": "crud",
"admin": "r",
"user": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "r",
"owner": "",
"user": "r",
"all": "",
"setup": "crud"
},
"pluralization": true
},
"caster": {
"enumValues": [],
"regExp": null,
"path": "type",
"instance": "String",
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
"type": "user defined",
"validator": {}
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"type"
],
"options": {
"validate": {},
"index": true
},
"_index": true,
"_arrayPath": "type.$",
"_arrayParentPath": "type"
},
"$embeddedSchemaType": {
"enumValues": [],
"regExp": null,
"path": "type",
"instance": "String",
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
"type": "user defined",
"validator": {}
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"type"
],
"options": {
"validate": {},
"index": true
},
"_index": true,
"_arrayPath": "type.$",
"_arrayParentPath": "type"
},
"$isMongooseArray": true,
"path": "type",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"type"
],
"options": {
"type": [
{
"validate": {},
"index": true
}
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "unavailable_reason",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"unavailable_reason"
],
"options": {},
"_index": null
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "urlid",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"urlid"
],
"options": {
"index": {
"unique": true
}
},
"_index": {
"unique": true,
"background": true
}
}