Model leads


Permissions

User GroupCreate?Read?Update?Delete?
adminxxx
super_userxxxx
userx
allx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?
__vNumber
_deletedBooleanfalsex
_idObjectIDfunction defaultId() { return new oid(); }
_owner_idObjectID
_updated_by_idObjectIDUser_updated_byx
accounts_emailString
addressString
archivedBooleanfalsex
company_registration_numberString
createdAtDate
dataMixed
date_createdDatefunction now() { [native code] }x
date_startDatex
emailStringx
g-recaptcha-responseString
heatStringmild
how_did_you_find_out_about_usString
id_numberString
industrysector_idObjectIDIndustrySector
intercom_idString
leadsource_idObjectIDLeadSource
leadtype_idObjectIDLeadType
legal_nameString
location_idObjectIDLocationx
mailtemplate_idObjectID
marketing_opt_inBooleanfalse
meeting_dateDatex
membership_idObjectIDMembership
mobileString
nameStringx
opportunity_idArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
organisationString
paxNumber
postal_addressString
promo_codeString
referral_amountNumber
referral_date_paidDate
referral_user_idObjectIDUserreferral_user
seatsNumber
short_nameString
source_infoString
space_idObjectIDSpacex
spamBooleanfalse
updatedAtDate
urlString
vatString
websiteString

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": {},
	"_index": null
}
{
	"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": "accounts_email",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"accounts_email"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "address",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"address"
	],
	"options": {},
	"_index": null
}
{
	"path": "archived",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"archived"
	],
	"options": {
		"default": false,
		"index": true
	},
	"_index": true,
	"defaultValue": false
}
{
	"enumValues": [],
	"regExp": null,
	"path": "company_registration_number",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"company_registration_number"
	],
	"options": {},
	"_index": null
}
{
	"path": "createdAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [
		null,
		null
	],
	"_presplitPath": [
		"createdAt"
	],
	"options": {
		"immutable": true
	},
	"_index": null,
	"$immutable": true
}
{
	"path": "data",
	"instance": "Mixed",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"data"
	],
	"options": {},
	"_index": null
}
{
	"path": "date_created",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"date_created"
	],
	"options": {
		"index": true
	},
	"_index": true
}
{
	"path": "date_start",
	"instance": "Date",
	"validators": [
		{
			"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (3000-01-01).",
			"type": "max",
			"max": "3000-01-01"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"date_start"
	],
	"options": {
		"max": "3000-01-01",
		"index": true
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "email",
	"instance": "String",
	"validators": [
		{
			"message": "Please use a valid email address",
			"type": "user defined"
		}
	],
	"getters": [],
	"setters": [
		null
	],
	"_presplitPath": [
		"email"
	],
	"options": {
		"index": true,
		"validate": [
			null,
			"Please use a valid email address"
		]
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "g-recaptcha-response",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"g-recaptcha-response"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "heat",
	"instance": "String",
	"validators": [
		{
			"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
			"type": "user defined",
			"validator": {}
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"heat"
	],
	"options": {
		"validate": {},
		"default": "mild"
	},
	"_index": null,
	"defaultValue": "mild"
}
{
	"enumValues": [],
	"regExp": null,
	"path": "how_did_you_find_out_about_us",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"how_did_you_find_out_about_us"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "id_number",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"id_number"
	],
	"options": {},
	"_index": null
}
{
	"path": "industrysector_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"industrysector_id"
	],
	"options": {
		"link": "IndustrySector"
	},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "intercom_id",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"intercom_id"
	],
	"options": {},
	"_index": null
}
{
	"path": "leadsource_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"leadsource_id"
	],
	"options": {
		"link": "LeadSource"
	},
	"_index": null
}
{
	"path": "leadtype_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"leadtype_id"
	],
	"options": {
		"link": "LeadType"
	},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "legal_name",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"legal_name"
	],
	"options": {},
	"_index": null
}
{
	"path": "location_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"location_id"
	],
	"options": {
		"index": true,
		"link": "Location"
	},
	"_index": true
}
{
	"path": "mailtemplate_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"mailtemplate_id"
	],
	"options": {},
	"_index": null
}
{
	"path": "marketing_opt_in",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"marketing_opt_in"
	],
	"options": {
		"default": false
	},
	"_index": null,
	"defaultValue": false
}
{
	"path": "meeting_date",
	"instance": "Date",
	"validators": [
		{
			"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (3000-01-01).",
			"type": "max",
			"max": "3000-01-01"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"meeting_date"
	],
	"options": {
		"max": "3000-01-01",
		"index": true
	},
	"_index": true
}
{
	"path": "membership_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"membership_id"
	],
	"options": {
		"link": "Membership"
	},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "mobile",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"mobile"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "name",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"name"
	],
	"options": {
		"index": true
	},
	"_index": true
}
{
	"schemaOptions": {
		"timestamps": true,
		"toJSON": {
			"virtuals": true
		},
		"toObject": {
			"virtuals": true
		},
		"perms": {
			"admin": "cru",
			"super_user": "crud",
			"user": "c",
			"all": "c"
		},
		"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": "c",
			"all": "c",
			"super_user": "crud"
		},
		"pluralization": true
	},
	"caster": {
		"path": "opportunity_id",
		"instance": "ObjectID",
		"validators": [],
		"getters": [],
		"setters": [],
		"_presplitPath": [
			"opportunity_id"
		],
		"options": {
			"link": "Opportunity"
		},
		"_index": null,
		"_arrayPath": "opportunity_id.$",
		"_arrayParentPath": "opportunity_id"
	},
	"$embeddedSchemaType": {
		"path": "opportunity_id",
		"instance": "ObjectID",
		"validators": [],
		"getters": [],
		"setters": [],
		"_presplitPath": [
			"opportunity_id"
		],
		"options": {
			"link": "Opportunity"
		},
		"_index": null,
		"_arrayPath": "opportunity_id.$",
		"_arrayParentPath": "opportunity_id"
	},
	"$isMongooseArray": true,
	"path": "opportunity_id",
	"instance": "Array",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"opportunity_id"
	],
	"options": {
		"type": [
			{
				"link": "Opportunity"
			}
		]
	},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "organisation",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"organisation"
	],
	"options": {},
	"_index": null
}
{
	"path": "pax",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"pax"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "postal_address",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"postal_address"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "promo_code",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"promo_code"
	],
	"options": {},
	"_index": null
}
{
	"path": "referral_amount",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"referral_amount"
	],
	"options": {},
	"_index": null
}
{
	"path": "referral_date_paid",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"referral_date_paid"
	],
	"options": {},
	"_index": null
}
{
	"path": "referral_user_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"referral_user_id"
	],
	"options": {
		"link": "User",
		"map_to": "referral_user"
	},
	"_index": null
}
{
	"path": "seats",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"seats"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "short_name",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"short_name"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "source_info",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"source_info"
	],
	"options": {},
	"_index": null
}
{
	"path": "space_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"space_id"
	],
	"options": {
		"index": true,
		"link": "Space"
	},
	"_index": true
}
{
	"path": "spam",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"spam"
	],
	"options": {
		"default": false
	},
	"_index": null,
	"defaultValue": false
}
{
	"path": "updatedAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"updatedAt"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "url",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"url"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "vat",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"vat"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "website",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"website"
	],
	"options": {},
	"_index": null
}