Model lineitems


Permissions

User GroupCreate?Read?Update?Delete?
financexxxx
managerxxxx
line_managerxxxx
adminx
ownerx
primary_memberx
userx
all

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?
__vNumber
_deletedBooleanfalsex
_idObjectIDfunction defaultId() { return new oid(); }
_owner_idObjectID
_updated_by_idObjectIDUser_updated_byx
_versionNumber0
amountNumber
booking_idObjectIDBooking
commentString
createdAtDate
date_createdDatefunction now() { [native code] }
date_endDatex
date_startDatex
descriptionString
discountNumber0
discount_commentString
discount_date_endDate
discount_date_startDate
discount_descriptionString
invoice_idObjectIDInvoice
is_quoteBoolean
license_idObjectIDLicensex
location_idObjectIDLocationx
orderNumber
organisation_idObjectIDOrganisationx
priceNumber
price_customisedBooleanfalse
price_customised_dateDate
price_customised_reasonString
price_customised_user_idObjectIDUserprice_customised_user
product_idObjectIDProduct
tax_typeString
updatedAtDate
user_idObjectIDUser
wallet_idObjectIDWalletx
xero_idString

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,
	"$fullPath": "_deleted"
}
{
	"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
}
{
	"path": "_version",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"_version"
	],
	"options": {
		"default": 0
	},
	"_index": null,
	"defaultValue": 0
}
{
	"path": "amount",
	"instance": "Number",
	"validators": [
		{
			"message": "Path `{PATH}` is required.",
			"type": "required"
		},
		{
			"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
			"type": "user defined"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"amount"
	],
	"options": {
		"required": true
	},
	"_index": null,
	"isRequired": true,
	"originalRequiredValue": true
}
{
	"path": "booking_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"booking_id"
	],
	"options": {
		"link": "Booking"
	},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "comment",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"comment"
	],
	"options": {},
	"_index": null
}
{
	"path": "createdAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [
		null,
		null
	],
	"_presplitPath": [
		"createdAt"
	],
	"options": {
		"immutable": true
	},
	"_index": null,
	"$immutable": true,
	"$fullPath": "createdAt"
}
{
	"path": "date_created",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"date_created"
	],
	"options": {},
	"_index": null
}
{
	"path": "date_end",
	"instance": "Date",
	"validators": [
		{
			"message": "Line Item end date cannot exceed 10 years from Line Item start date.",
			"type": "user defined"
		},
		{
			"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": {
		"validate": {
			"message": "Line Item end date cannot exceed 10 years from Line Item start date."
		},
		"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
}
{
	"enumValues": [],
	"regExp": null,
	"path": "description",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"description"
	],
	"options": {},
	"_index": null
}
{
	"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": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount_date_end"
	],
	"options": {},
	"_index": null
}
{
	"path": "discount_date_start",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"discount_date_start"
	],
	"options": {},
	"_index": null
}
{
	"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": null
}
{
	"path": "is_quote",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"is_quote"
	],
	"options": {},
	"_index": null
}
{
	"path": "license_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"license_id"
	],
	"options": {
		"link": "License",
		"unique": true,
		"sparse": true
	},
	"_index": {
		"unique": true,
		"sparse": true,
		"background": true
	}
}
{
	"path": "location_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"location_id"
	],
	"options": {
		"link": "Location",
		"index": true
	},
	"_index": true
}
{
	"path": "order",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"order"
	],
	"options": {},
	"_index": null
}
{
	"path": "organisation_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"organisation_id"
	],
	"options": {
		"link": "Organisation",
		"index": true
	},
	"_index": true
}
{
	"path": "price",
	"instance": "Number",
	"validators": [
		{
			"message": "Path `{PATH}` is required.",
			"type": "required"
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"price"
	],
	"options": {
		"required": true
	},
	"_index": null,
	"isRequired": true,
	"originalRequiredValue": true
}
{
	"path": "price_customised",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"price_customised"
	],
	"options": {
		"default": false
	},
	"_index": null,
	"defaultValue": false
}
{
	"path": "price_customised_date",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"price_customised_date"
	],
	"options": {},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "price_customised_reason",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"price_customised_reason"
	],
	"options": {},
	"_index": null
}
{
	"path": "price_customised_user_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"price_customised_user_id"
	],
	"options": {
		"link": "User",
		"map_to": "price_customised_user"
	},
	"_index": null
}
{
	"path": "product_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"product_id"
	],
	"options": {
		"link": "Product"
	},
	"_index": null
}
{
	"enumValues": [],
	"regExp": null,
	"path": "tax_type",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"tax_type"
	],
	"options": {},
	"_index": null
}
{
	"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
}
{
	"path": "wallet_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"wallet_id"
	],
	"options": {
		"link": "Wallet",
		"index": true
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "xero_id",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"xero_id"
	],
	"options": {},
	"_index": null
}