Model licenses
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| finance | x | x | x | x |
| line_manager | x | x | x | x |
| managers | x | x | | |
| admin | | x | | |
| primary_member | | 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 | User | _owner | | x | | |
| _updated_by_id | ObjectID | User | _updated_by | | x | | |
| amount | Number | | | | | | |
| claytag_id | ObjectID | Claytag | | | | | |
| createdAt | Date | | | | | | |
| date_created | Date | | | [Function] | | | |
| date_end | Date | | | | x | | |
| date_start | Date | | | | x | | |
| discount | Number | | | 0 | | | |
| discount_comment | String | | | | | | |
| discount_date_end | Date | | | | x | | |
| discount_date_start | Date | | | | x | | |
| discount_description | String | | | | | | |
| invoice_id | ObjectID | Invoice | | | x | | |
| lineitem_id | ObjectID | LineItem | | | x | | |
| location_id | ObjectID | Location | | | x | | |
| membership_id | ObjectID | Membership | | | | | x |
| organisation_id | ObjectID | Organisation | | | x | | x |
| price | Number | | | | | | |
| space_id | ObjectID | Space | | | x | | |
| updatedAt | Date | | | | | | |
| user_id | ObjectID | User | | | x | | |
| xero_account | String | | | | | | |
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
- : Validator failed for path `{PATH}` with value `{VALUE}`
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
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
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
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
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
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
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
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
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
- : Path `{PATH}` is required.
organisation_id
{
"path": "organisation_id",
"instance": "ObjectID",
"options": {
"link": "Organisation",
"index": true,
"required": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.
price
{
"path": "price",
"instance": "Number",
"options": {},
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`"
}
]
}Validators
- : Validator failed for path `{PATH}` with value `{VALUE}`
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": []
}