Model licenses


Permissions

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

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?Required?
__vNumber
_deletedBooleanfalsex
_idObjectID[Function]
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
amountNumber
claytag_idObjectIDClaytag
createdAtDate
date_createdDate[Function]
date_endDatex
date_startDatex
discountNumber0
discount_commentString
discount_date_endDatex
discount_date_startDatex
discount_descriptionString
invoice_idObjectIDInvoicex
lineitem_idObjectIDLineItemx
location_idObjectIDLocationx
membership_idObjectIDMembershipx
organisation_idObjectIDOrganisationxx
priceNumber
space_idObjectIDSpacex
updatedAtDate
user_idObjectIDUserx
xero_accountString

Field Details

__v

{
  "path": "__v",
  "instance": "Number",
  "options": {},
  "validators": []
}

_deleted

{
  "path": "_deleted",
  "instance": "Boolean",
  "options": {
    "default": false,
    "index": true
  },
  "validators": [],
  "defaultValue": false
}

_id

{
  "path": "_id",
  "instance": "ObjectID",
  "options": {
    "auto": true,
    "type": "ObjectId"
  },
  "validators": [],
  "defaultValue": "[Function]"
}

_owner_id

{
  "path": "_owner_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "map_to": "_owner",
    "index": true
  },
  "validators": []
}

_updated_by_id

{
  "path": "_updated_by_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "map_to": "_updated_by",
    "index": true
  },
  "validators": []
}

amount

{
  "path": "amount",
  "instance": "Number",
  "options": {},
  "validators": [
    {
      "message": "Validator failed for path `{PATH}` with value `{VALUE}`"
    }
  ]
}

Validators

claytag_id

{
  "path": "claytag_id",
  "instance": "ObjectID",
  "options": {
    "link": "Claytag"
  },
  "validators": []
}

createdAt

{
  "path": "createdAt",
  "instance": "Date",
  "options": {
    "immutable": true
  },
  "validators": []
}

date_created

{
  "path": "date_created",
  "instance": "Date",
  "options": {},
  "validators": [],
  "defaultValue": "[Function]"
}

date_end

{
  "path": "date_end",
  "instance": "Date",
  "options": {
    "max": "9999-12-31",
    "min": "1800-01-01",
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31)."
    },
    {
      "message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01)."
    }
  ]
}

Validators

date_start

{
  "path": "date_start",
  "instance": "Date",
  "options": {
    "max": "9999-12-31",
    "min": "1800-01-01",
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31)."
    },
    {
      "message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01)."
    }
  ]
}

Validators

discount

{
  "path": "discount",
  "instance": "Number",
  "options": {
    "default": 0
  },
  "validators": [],
  "defaultValue": 0
}

discount_comment

{
  "path": "discount_comment",
  "instance": "String",
  "options": {},
  "validators": []
}

discount_date_end

{
  "path": "discount_date_end",
  "instance": "Date",
  "options": {
    "max": "9999-12-31",
    "min": "1800-01-01",
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31)."
    },
    {
      "message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01)."
    }
  ]
}

Validators

discount_date_start

{
  "path": "discount_date_start",
  "instance": "Date",
  "options": {
    "max": "9999-12-31",
    "min": "1800-01-01",
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31)."
    },
    {
      "message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01)."
    }
  ]
}

Validators

discount_description

{
  "path": "discount_description",
  "instance": "String",
  "options": {},
  "validators": []
}

invoice_id

{
  "path": "invoice_id",
  "instance": "ObjectID",
  "options": {
    "link": "Invoice",
    "index": true
  },
  "validators": []
}

lineitem_id

{
  "path": "lineitem_id",
  "instance": "ObjectID",
  "options": {
    "link": "LineItem",
    "index": true
  },
  "validators": []
}

location_id

{
  "path": "location_id",
  "instance": "ObjectID",
  "options": {
    "link": "Location",
    "index": true
  },
  "validators": []
}

membership_id

{
  "path": "membership_id",
  "instance": "ObjectID",
  "options": {
    "link": "Membership",
    "required": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true
}

Validators

organisation_id

{
  "path": "organisation_id",
  "instance": "ObjectID",
  "options": {
    "link": "Organisation",
    "index": true,
    "required": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true
}

Validators

price

{
  "path": "price",
  "instance": "Number",
  "options": {},
  "validators": [
    {
      "message": "Validator failed for path `{PATH}` with value `{VALUE}`"
    }
  ]
}

Validators

space_id

{
  "path": "space_id",
  "instance": "ObjectID",
  "options": {
    "link": "Space",
    "index": true
  },
  "validators": []
}

updatedAt

{
  "path": "updatedAt",
  "instance": "Date",
  "options": {},
  "validators": []
}

user_id

{
  "path": "user_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "index": true
  },
  "validators": []
}

xero_account

{
  "path": "xero_account",
  "instance": "String",
  "options": {},
  "validators": []
}