Model wallets


Permissions

User GroupCreate?Read?Update?Delete?
adminx
financexxxx
setupxxxx
userx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?Required?
__vNumber
_deletedBooleanfalsex
_idObjectID[Function]
_owner_idObjectID
_updated_by_idObjectIDUser_updated_byx
balanceNumber0
createdAtDate
currency_idObjectIDCurrencyxx
date_createdDate[Function]
deduction_methodStringpriority
last_quota_dateDate[Function]x
location_idObjectIDLocationx
nameStringxx
organisation_idObjectIDOrganisationx
organisation_wideBooleanfalse
overflowBooleanfalse
overflow_toObjectIDWalletx
parkingBooleanfalsex
personalBoolean
previous_balanceNumber0
priorityNumberx
quota_amountNumber0
quota_frequencyStringneverx
quota_typeStringfreex
updatedAtDate
user_idArray of ObjectID[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": {},
  "validators": []
}

_updated_by_id

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

balance

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

createdAt

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

currency_id

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

Validators

date_created

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

deduction_method

{
  "path": "deduction_method",
  "instance": "String",
  "options": {
    "enum": [
      "priority",
      "direct"
    ],
    "default": "priority"
  },
  "validators": [
    {
      "message": "`{VALUE}` is not a valid enum value for path `{PATH}`."
    }
  ],
  "defaultValue": "priority"
}

Validators

last_quota_date

{
  "path": "last_quota_date",
  "instance": "Date",
  "options": {
    "index": true
  },
  "validators": [],
  "defaultValue": "[Function]"
}

location_id

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

name

{
  "path": "name",
  "instance": "String",
  "options": {
    "required": true,
    "validate": {},
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    },
    {
      "message": "Validator failed for path `{PATH}` with value `{VALUE}`"
    }
  ],
  "isRequired": true
}

Validators

organisation_id

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

organisation_wide

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

overflow

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

overflow_to

{
  "path": "overflow_to",
  "instance": "ObjectID",
  "options": {
    "index": true,
    "link": "Wallet"
  },
  "validators": []
}

parking

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

personal

{
  "path": "personal",
  "instance": "Boolean",
  "options": {},
  "validators": []
}

previous_balance

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

priority

{
  "path": "priority",
  "instance": "Number",
  "options": {
    "required": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true
}

Validators

quota_amount

{
  "path": "quota_amount",
  "instance": "Number",
  "options": {
    "default": 0,
    "min": 0
  },
  "validators": [
    {
      "message": "Path `{PATH}` ({VALUE}) is less than minimum allowed value (0)."
    }
  ],
  "defaultValue": 0
}

Validators

quota_frequency

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

Validators

quota_type

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

Validators

updatedAt

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

user_id

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