Model contacts
Permissions
User Group | Create? | Read? | Update? | Delete? |
---|
admin | 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 | |
bio | String | | | | | |
createdAt | Date | | | | | |
email | String | | | | x | |
guest_id | ObjectID | Guest | | | | |
img | String | | | | | |
lead_id | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
mobile | String | | | | | |
name | String | | | | | |
notes | Array | | | function() {
let arr = fn.call(this);
if (arr != null && !Array.isArray(arr)) {
arr = [arr];
}
// Leave it up to `cast()` to convert this to a documentarray
return arr;
} | | |
organisation | String | | | | | |
updatedAt | Date | | | | | |
user_id | ObjectID | User | | | | |
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": "bio",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"bio"
],
"options": {},
"_index": null,
"$fullPath": "bio"
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true,
"$fullPath": "createdAt"
}
{
"enumValues": [],
"regExp": null,
"path": "email",
"instance": "String",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"email"
],
"options": {
"index": true,
"required": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true,
"$fullPath": "email"
}
{
"path": "guest_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"guest_id"
],
"options": {
"link": "Guest"
},
"_index": null,
"$fullPath": "guest_id"
}
{
"enumValues": [],
"regExp": null,
"path": "img",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"img"
],
"options": {},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "cru"
},
"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": "cru",
"owner": "",
"user": "",
"all": ""
},
"pluralization": true
},
"caster": {
"path": "lead_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"lead_id"
],
"options": {
"link": "Lead"
},
"_index": null,
"_arrayPath": "lead_id.$",
"_arrayParentPath": "lead_id"
},
"$embeddedSchemaType": {
"path": "lead_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"lead_id"
],
"options": {
"link": "Lead"
},
"_index": null,
"_arrayPath": "lead_id.$",
"_arrayParentPath": "lead_id"
},
"$isMongooseArray": true,
"path": "lead_id",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"lead_id"
],
"options": {
"type": [
{
"link": "Lead"
}
]
},
"_index": null,
"$fullPath": "lead_id"
}
{
"enumValues": [],
"regExp": null,
"path": "mobile",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mobile"
],
"options": {},
"_index": null,
"$fullPath": "mobile"
}
{
"enumValues": [],
"regExp": null,
"path": "name",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"name"
],
"options": {},
"_index": null,
"$fullPath": "name"
}
{
"schemaOptions": {},
"$embeddedSchemaType": {
"path": "notes.$",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"notes",
"$"
],
"options": {
"required": false
},
"_index": null,
"isRequired": false,
"$isMongooseDocumentArrayElement": true,
"schema": {
"obj": {
"date_created": {},
"user_id": {
"link": "User"
}
},
"paths": {
"note": {
"enumValues": [],
"regExp": null,
"path": "note",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"note"
],
"options": {},
"_index": null,
"$isUnderneathDocArray": true
},
"date_created": {
"path": "date_created",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date_created"
],
"options": {},
"_index": null,
"$isUnderneathDocArray": true
},
"user_id": {
"path": "user_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"user_id"
],
"options": {
"link": "User"
},
"_index": null,
"$isUnderneathDocArray": true
},
"_id": {
"path": "_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"_id"
],
"options": {
"auto": true,
"type": "ObjectId"
},
"_index": null,
"$isUnderneathDocArray": true
}
},
"aliases": {},
"subpaths": {},
"virtuals": {
"id": {
"path": "id",
"getters": [
null
],
"setters": [],
"options": {}
}
},
"singleNestedPaths": {},
"nested": {},
"inherits": {},
"callQueue": [],
"_indexes": [],
"methods": {},
"methodOptions": {},
"statics": {},
"tree": {
"date_created": {},
"user_id": {
"link": "User"
},
"_id": {
"auto": true,
"type": "ObjectId"
},
"id": {
"path": "id",
"getters": [
null
],
"setters": [],
"options": {}
}
},
"query": {},
"childSchemas": [],
"plugins": [
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
}
],
"$id": 49,
"mapPaths": [],
"s": {
"hooks": {
"_pres": {},
"_posts": {}
}
},
"_userProvidedOptions": {
"minimize": true,
"typeKey": "type",
"strict": true,
"strictQuery": true
},
"options": {
"minimize": true,
"typeKey": "type",
"strict": true,
"strictQuery": true,
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true
},
"$implicitlyCreated": true,
"$globalPluginsApplied": true
}
},
"$isMongooseArray": true,
"path": "notes",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"notes"
],
"options": {
"type": [
{
"date_created": {},
"user_id": {
"link": "User"
}
}
]
},
"_index": null,
"schema": {
"obj": {
"date_created": {},
"user_id": {
"link": "User"
}
},
"paths": {
"note": {
"enumValues": [],
"regExp": null,
"path": "note",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"note"
],
"options": {},
"_index": null,
"$isUnderneathDocArray": true
},
"date_created": {
"path": "date_created",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date_created"
],
"options": {},
"_index": null,
"$isUnderneathDocArray": true
},
"user_id": {
"path": "user_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"user_id"
],
"options": {
"link": "User"
},
"_index": null,
"$isUnderneathDocArray": true
},
"_id": {
"path": "_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"_id"
],
"options": {
"auto": true,
"type": "ObjectId"
},
"_index": null,
"$isUnderneathDocArray": true
}
},
"aliases": {},
"subpaths": {},
"virtuals": {
"id": {
"path": "id",
"getters": [
null
],
"setters": [],
"options": {}
}
},
"singleNestedPaths": {},
"nested": {},
"inherits": {},
"callQueue": [],
"_indexes": [],
"methods": {},
"methodOptions": {},
"statics": {},
"tree": {
"date_created": {},
"user_id": {
"link": "User"
},
"_id": {
"auto": true,
"type": "ObjectId"
},
"id": {
"path": "id",
"getters": [
null
],
"setters": [],
"options": {}
}
},
"query": {},
"childSchemas": [],
"plugins": [
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
},
{
"opts": {
"deduplicate": true
}
}
],
"$id": 49,
"mapPaths": [],
"s": {
"hooks": {
"_pres": {},
"_posts": {}
}
},
"_userProvidedOptions": {
"minimize": true,
"typeKey": "type",
"strict": true,
"strictQuery": true
},
"options": {
"minimize": true,
"typeKey": "type",
"strict": true,
"strictQuery": true,
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true
},
"$implicitlyCreated": true,
"$globalPluginsApplied": true
},
"$isMongooseDocumentArray": true
}
{
"enumValues": [],
"regExp": null,
"path": "organisation",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation"
],
"options": {},
"_index": null,
"$fullPath": "organisation"
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null,
"$fullPath": "updatedAt"
}
{
"path": "user_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"user_id"
],
"options": {
"link": "User"
},
"_index": null,
"$fullPath": "user_id"
}