Model ledgers


Permissions

User GroupCreate?Read?Update?Delete?
super_userxxxx
line_managerxxx
apixxx
posxx
ownerxxx
adminx
userxx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?Required?
__vNumber
_deletedBooleanfalsex
_idObjectID[Function]
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
amountNumberx
balanceNumber
createdAtDate
cred_typeStringx
currency_idObjectIDCurrencyx
dateDate[Function]xx
descriptionString
detailsMixed
emailString
invoice_idObjectIDInvoicex
is_transferBooleanfalse
location_idObjectIDLocationx
organisation_idObjectIDOrganisationx
partner_idObjectIDPartnerx
partner_referenceMixedx
product_idArray of ObjectID[Function]
receiptString
reserveBooleanfalse
reserve_expiresDate[Function]
source_idObjectID
source_typeString
transaction_typeString
updatedAtDate
user_idObjectIDUserxx
wallet_idArray of ObjectID[Function]
wallet_splitArray of Mixed[Function]

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": {
    "required": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true
}

Validators

balance

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

createdAt

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

cred_type

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

currency_id

{
  "path": "currency_id",
  "instance": "ObjectID",
  "options": {
    "index": true,
    "link": "Currency"
  },
  "validators": []
}

date

{
  "path": "date",
  "instance": "Date",
  "options": {
    "required": true,
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true,
  "defaultValue": "[Function]"
}

Validators

description

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

details

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

email

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

invoice_id

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

is_transfer

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

location_id

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

organisation_id

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

partner_id

{
  "path": "partner_id",
  "instance": "ObjectID",
  "options": {
    "index": true,
    "link": "Partner"
  },
  "validators": []
}

partner_reference

{
  "path": "partner_reference",
  "instance": "Mixed",
  "options": {
    "unique": true,
    "sparse": true
  },
  "validators": []
}

product_id

{
  "path": "product_id",
  "instance": "Array",
  "options": {
    "type": [
      {
        "index": true,
        "link": "Product"
      }
    ]
  },
  "validators": [],
  "defaultValue": "[Function]",
  "arrayType": "ObjectID"
}

receipt

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

reserve

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

reserve_expires

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

source_id

{
  "path": "source_id",
  "instance": "ObjectID",
  "options": {},
  "validators": []
}

source_type

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

transaction_type

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

Validators

updatedAt

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

user_id

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

Validators

wallet_id

{
  "path": "wallet_id",
  "instance": "Array",
  "options": {
    "type": [
      {
        "index": true,
        "link": "Wallet"
      }
    ]
  },
  "validators": [],
  "defaultValue": "[Function]",
  "arrayType": "ObjectID"
}

wallet_split

{
  "path": "wallet_split",
  "instance": "Array",
  "options": {
    "type": [
      null
    ]
  },
  "validators": [],
  "defaultValue": "[Function]",
  "arrayType": "Mixed"
}