Model payments


Permissions

User GroupCreate?Read?Update?Delete?
adminxxxx
ownerxxx
primary_memberx
userx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?Required?
__vNumber
_deletedBooleanfalsex
_idObjectID[Function]
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
account_idStringx
accounting_invoice_idStringx
accounting_payment_idStringx
amountNumber
createdAtDate
currency_codeString
dateDatex
invoice_idObjectIDInvoicex
is_reconciledBooleanfalse
location_idObjectIDLocationx
organisation_idObjectIDOrganisationx
payment_methodString
payment_resultMixed
referenceString
sourceStringx
statusStringx
updatedAtDate
user_idObjectIDUserx

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": []
}

account_id

{
  "path": "account_id",
  "instance": "String",
  "options": {
    "index": true
  },
  "validators": []
}

accounting_invoice_id

{
  "path": "accounting_invoice_id",
  "instance": "String",
  "options": {
    "index": true
  },
  "validators": []
}

accounting_payment_id

{
  "path": "accounting_payment_id",
  "instance": "String",
  "options": {
    "index": true
  },
  "validators": []
}

amount

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

createdAt

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

currency_code

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

date

{
  "path": "date",
  "instance": "Date",
  "options": {
    "index": true
  },
  "validators": []
}

invoice_id

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

is_reconciled

{
  "path": "is_reconciled",
  "instance": "Boolean",
  "options": {
    "default": false
  },
  "validators": [],
  "defaultValue": false
}

location_id

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

organisation_id

{
  "path": "organisation_id",
  "instance": "ObjectID",
  "options": {
    "index": true,
    "link": "Organisation"
  },
  "validators": []
}

payment_method

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

payment_result

{
  "path": "payment_result",
  "instance": "Mixed",
  "options": {},
  "validators": []
}

reference

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

source

{
  "path": "source",
  "instance": "String",
  "options": {
    "validate": {},
    "index": true
  },
  "validators": [
    {
      "message": "Validator failed for path `{PATH}` with value `{VALUE}`"
    }
  ]
}

Validators

status

{
  "path": "status",
  "instance": "String",
  "options": {
    "index": true
  },
  "validators": []
}

updatedAt

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

user_id

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