Model wallets
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| admin | | x | | |
| finance | x | x | x | x |
| setup | x | x | x | x |
| user | | x | | |
Fields
| Name | Type | Link | Maps To | Default | Indexed? | Unique? | Required? |
|---|
| __v | Number | | | | | | |
| _deleted | Boolean | | | false | x | | |
| _id | ObjectID | | | [Function] | | | |
| _owner_id | ObjectID | | | | | | |
| _updated_by_id | ObjectID | User | _updated_by | | x | | |
| balance | Number | | | 0 | | | |
| createdAt | Date | | | | | | |
| currency_id | ObjectID | Currency | | | x | | x |
| date_created | Date | | | [Function] | | | |
| last_quota_date | Date | | | [Function] | x | | |
| name | String | | | | x | | x |
| organisation_id | ObjectID | Organisation | | | x | | |
| organisation_wide | Boolean | | | false | | | |
| personal | Boolean | | | | | | |
| previous_balance | Number | | | 0 | | | |
| priority | Number | | | | | | x |
| quota_amount | Number | | | 0 | | | |
| quota_frequency | String | | | never | x | | |
| quota_type | String | | | free | x | | |
| updatedAt | Date | | | | | | |
| user_id | Array 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,
"min": 0
},
"validators": [
{
"message": "Path `{PATH}` ({VALUE}) is less than minimum allowed value (0)."
}
],
"defaultValue": 0
}Validators
- : Path `{PATH}` ({VALUE}) is less than minimum allowed value (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
- : Path `{PATH}` is required.
date_created
{
"path": "date_created",
"instance": "Date",
"options": {},
"validators": [],
"defaultValue": "[Function]"
}last_quota_date
{
"path": "last_quota_date",
"instance": "Date",
"options": {
"index": true
},
"validators": [],
"defaultValue": "[Function]"
}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
- : Path `{PATH}` is required.
- : Validator failed for path `{PATH}` with value `{VALUE}`
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
}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
- : Path `{PATH}` is required.
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
- : Path `{PATH}` ({VALUE}) is less than minimum allowed value (0).
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
- : Validator failed for path `{PATH}` with value `{VALUE}`
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
- : Validator failed for path `{PATH}` with value `{VALUE}`
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"
}