Model leads
Permissions
| User Group | Create? | Read? | Update? | Delete? | 
|---|
| admin | x | x | x |  | 
| super_user | x | x | x | x | 
| user | x |  |  |  | 
| all | 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 |  |  |  |  |  | 
| _updated_by_id | ObjectID | User | _updated_by |  | x |  | 
| accounts_email | String |  |  |  |  |  | 
| address | String |  |  |  |  |  | 
| archived | Boolean |  |  | false | x |  | 
| company_registration_number | String |  |  |  |  |  | 
| createdAt | Date |  |  |  |  |  | 
| data | Mixed |  |  |  |  |  | 
| date_created | Date |  |  | function now() { [native code] } | x |  | 
| date_start | Date |  |  |  | x |  | 
| email | String |  |  |  | x |  | 
| g-recaptcha-response | String |  |  |  |  |  | 
| heat | String |  |  | mild |  |  | 
| how_did_you_find_out_about_us | String |  |  |  |  |  | 
| id_number | String |  |  |  |  |  | 
| industrysector_id | ObjectID | IndustrySector |  |  |  |  | 
| intercom_id | String |  |  |  |  |  | 
| leadsource_id | ObjectID | LeadSource |  |  |  |  | 
| leadtype_id | ObjectID | LeadType |  |  |  |  | 
| legal_name | String |  |  |  |  |  | 
| location_id | ObjectID | Location |  |  | x |  | 
| mailtemplate_id | ObjectID |  |  |  |  |  | 
| marketing_opt_in | Boolean |  |  | false |  |  | 
| meeting_date | Date |  |  |  | x |  | 
| membership_id | ObjectID | Membership |  |  |  |  | 
| mobile | String |  |  |  |  |  | 
| name | String |  |  |  | x |  | 
| opportunity_id | Array |  |  | function() {
      // Leave it up to `cast()` to convert the array
      return fn
        ? defaultArr.call(this)
        : defaultArr != null
          ? [].concat(defaultArr)
          : [];
    } |  |  | 
| organisation | String |  |  |  |  |  | 
| pax | Number |  |  |  |  |  | 
| postal_address | String |  |  |  |  |  | 
| promo_code | String |  |  |  |  |  | 
| referral_amount | Number |  |  |  |  |  | 
| referral_date_paid | Date |  |  |  |  |  | 
| referral_user_id | ObjectID | User | referral_user |  |  |  | 
| seats | Number |  |  |  |  |  | 
| short_name | String |  |  |  |  |  | 
| source_info | String |  |  |  |  |  | 
| space_id | ObjectID | Space |  |  | x |  | 
| spam | Boolean |  |  | false |  |  | 
| updatedAt | Date |  |  |  |  |  | 
| url | String |  |  |  |  |  | 
| vat | String |  |  |  |  |  | 
| website | String |  |  |  |  |  | 
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
}