Model notices
Permissions
User Group | Create? | Read? | Update? | Delete? |
---|
admin | x | x | x | x |
user | x | x | | |
owner | x | x | x | 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 | |
createdAt | Date | | | | | |
display_end | Date | | | 1740085261310 | | |
display_start | Date | | | Wed Nov 20 2024 23:01:01 GMT+0200 (South Africa Standard Time) | | |
location_id | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
message | String | | | | | |
pinned | Boolean | | | false | x | |
type | String | | | request | x | |
updatedAt | Date | | | | | |
user_id | ObjectID | User | | | 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
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true
}
{
"path": "display_end",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"display_end"
],
"options": {
"default": 1740085261310
},
"_index": null,
"defaultValue": "2025-02-20T21:01:01.310Z"
}
{
"path": "display_start",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"display_start"
],
"options": {
"default": "2024-11-20T21:01:01.310Z"
},
"_index": null,
"defaultValue": "2024-11-20T21:01:01.310Z"
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"user": "cr",
"owner": "crud"
},
"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": "crud",
"owner": "crud",
"user": "cr",
"all": ""
},
"pluralization": true
},
"caster": {
"path": "location_id",
"instance": "ObjectID",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location",
"required": true,
"index": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true,
"_arrayPath": "location_id.$",
"_arrayParentPath": "location_id"
},
"$embeddedSchemaType": {
"path": "location_id",
"instance": "ObjectID",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location",
"required": true,
"index": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true,
"_arrayPath": "location_id.$",
"_arrayParentPath": "location_id"
},
"$isMongooseArray": true,
"path": "location_id",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"type": [
{
"link": "Location",
"required": true,
"index": true
}
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "message",
"instance": "String",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"message"
],
"options": {
"required": true
},
"_index": null,
"isRequired": true,
"originalRequiredValue": true
}
{
"path": "pinned",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"pinned"
],
"options": {
"default": false,
"index": true
},
"_index": true,
"defaultValue": false
}
{
"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": {},
"default": "request",
"index": true
},
"_index": true,
"defaultValue": "request"
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null
}
{
"path": "user_id",
"instance": "ObjectID",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"user_id"
],
"options": {
"link": "User",
"required": true,
"index": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true
}