Model licenses


Permissions

User GroupCreate?Read?Update?Delete?
financexxxx
line_managerxxxx
managersxx
adminx
primary_memberx
userx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?
__vNumber
_deletedBooleanfalsex
_idObjectIDfunction defaultId() { return new oid(); }
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
amountNumber
claytag_idObjectIDClaytag
createdAtDate
date_createdDatefunction now() { [native code] }
date_endDatex
date_startDatex
discountNumber0
discount_commentString
discount_date_endDatex
discount_date_startDatex
discount_descriptionString
invoice_idObjectIDInvoicex
lineitem_idObjectIDLineItemx
location_idObjectIDLocationx
membership_idObjectIDMembership
organisation_idObjectIDOrganisationx
priceNumber
space_idObjectIDSpacex
updatedAtDate
user_idObjectIDUserx
xero_accountString

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": "amount",
	"instance": "Number",
	"validators": [
		{
			"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
			"type": "user defined"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"amount"
	],
	"options": {},
	"_index": null
}
{
	"path": "claytag_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"claytag_id"
	],
	"options": {
		"link": "Claytag"
	},
	"_index": null
}
{
	"path": "createdAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [
		null,
		null
	],
	"_presplitPath": [
		"createdAt"
	],
	"options": {
		"immutable": true
	},
	"_index": null,
	"$immutable": true
}
{
	"path": "date_created",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"date_created"
	],
	"options": {},
	"_index": null
}
{
	"path": "date_end",
	"instance": "Date",
	"validators": [
		{
			"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).",
			"type": "max",
			"max": "9999-12-31"
		},
		{
			"message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).",
			"type": "min",
			"min": "1800-01-01"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"date_end"
	],
	"options": {
		"max": "9999-12-31",
		"min": "1800-01-01",
		"index": true
	},
	"_index": true
}
{
	"path": "date_start",
	"instance": "Date",
	"validators": [
		{
			"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).",
			"type": "max",
			"max": "9999-12-31"
		},
		{
			"message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).",
			"type": "min",
			"min": "1800-01-01"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"date_start"
	],
	"options": {
		"max": "9999-12-31",
		"min": "1800-01-01",
		"index": true
	},
	"_index": true
}
{
	"path": "discount",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount"
	],
	"options": {
		"default": 0
	},
	"_index": null,
	"defaultValue": 0
}
{
	"enumValues": [],
	"regExp": null,
	"path": "discount_comment",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount_comment"
	],
	"options": {},
	"_index": null
}
{
	"path": "discount_date_end",
	"instance": "Date",
	"validators": [
		{
			"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).",
			"type": "max",
			"max": "9999-12-31"
		},
		{
			"message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).",
			"type": "min",
			"min": "1800-01-01"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount_date_end"
	],
	"options": {
		"max": "9999-12-31",
		"min": "1800-01-01",
		"index": true
	},
	"_index": true
}
{
	"path": "discount_date_start",
	"instance": "Date",
	"validators": [
		{
			"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).",
			"type": "max",
			"max": "9999-12-31"
		},
		{
			"message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).",
			"type": "min",
			"min": "1800-01-01"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount_date_start"
	],
	"options": {
		"max": "9999-12-31",
		"min": "1800-01-01",
		"index": true
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "discount_description",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount_description"
	],
	"options": {},
	"_index": null
}
{
	"path": "invoice_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"invoice_id"
	],
	"options": {
		"link": "Invoice",
		"index": true
	},
	"_index": true
}
{
	"path": "lineitem_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"lineitem_id"
	],
	"options": {
		"link": "LineItem",
		"index": true
	},
	"_index": true
}
{
	"path": "location_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"location_id"
	],
	"options": {
		"link": "Location",
		"index": true
	},
	"_index": true
}
{
	"path": "membership_id",
	"instance": "ObjectID",
	"validators": [
		{
			"message": "Path `{PATH}` is required.",
			"type": "required"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"membership_id"
	],
	"options": {
		"link": "Membership",
		"required": true
	},
	"_index": null,
	"isRequired": true,
	"originalRequiredValue": true
}
{
	"path": "organisation_id",
	"instance": "ObjectID",
	"validators": [
		{
			"message": "Path `{PATH}` is required.",
			"type": "required"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"organisation_id"
	],
	"options": {
		"link": "Organisation",
		"index": true,
		"required": true
	},
	"_index": true,
	"isRequired": true,
	"originalRequiredValue": true
}
{
	"path": "price",
	"instance": "Number",
	"validators": [
		{
			"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
			"type": "user defined"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"price"
	],
	"options": {},
	"_index": null
}
{
	"path": "space_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"space_id"
	],
	"options": {
		"link": "Space",
		"index": true
	},
	"_index": true
}
{
	"path": "updatedAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"updatedAt"
	],
	"options": {},
	"_index": null
}
{
	"path": "user_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"user_id"
	],
	"options": {
		"link": "User",
		"index": true
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "xero_account",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"xero_account"
	],
	"options": {},
	"_index": null
}