Model adhocs
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| admin | x | x | x | x |
| owner | x | x | | |
| primary_member | | x | | |
| user | | x | | |
| all | | | | |
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 | | | | | | x |
| booking_id | ObjectID | Booking | | | | | |
| comment | String | | | | | | |
| createdAt | Date | | | | | | |
| date_created | Date | | | [Function] | | | |
| date_end | Date | | | | | | |
| date_start | Date | | | | | | |
| description | String | | | | | | |
| discount | Number | | | 0 | | | |
| invoice_id | ObjectID | Invoice | | | | | |
| is_quote | Boolean | | | | | | |
| license_id | ObjectID | License | | | | | |
| location_id | ObjectID | Location | | | x | | |
| order | Number | | | | | | |
| organisation_id | ObjectID | Organisation | | | x | | |
| price | Number | | | | | | x |
| product_id | ObjectID | Product | | | | | |
| tax_type | String | | | | | | |
| updatedAt | Date | | | | | | |
| user_id | ObjectID | User | | | | | |
| wallet_id | ObjectID | Wallet | | | x | | |
| xero_account | String | | | | | | |
| xero_id | 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": {
"required": 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}`
booking_id
{
"path": "booking_id",
"instance": "ObjectID",
"options": {
"link": "Booking"
},
"validators": []
}comment
{
"path": "comment",
"instance": "String",
"options": {},
"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": {},
"validators": []
}date_start
{
"path": "date_start",
"instance": "Date",
"options": {},
"validators": []
}description
{
"path": "description",
"instance": "String",
"options": {},
"validators": []
}discount
{
"path": "discount",
"instance": "Number",
"options": {
"default": 0
},
"validators": [],
"defaultValue": 0
}invoice_id
{
"path": "invoice_id",
"instance": "ObjectID",
"options": {
"link": "Invoice"
},
"validators": []
}is_quote
{
"path": "is_quote",
"instance": "Boolean",
"options": {},
"validators": []
}license_id
{
"path": "license_id",
"instance": "ObjectID",
"options": {
"link": "License"
},
"validators": []
}location_id
{
"path": "location_id",
"instance": "ObjectID",
"options": {
"link": "Location",
"index": true
},
"validators": []
}order
{
"path": "order",
"instance": "Number",
"options": {},
"validators": []
}organisation_id
{
"path": "organisation_id",
"instance": "ObjectID",
"options": {
"link": "Organisation",
"index": true
},
"validators": []
}price
{
"path": "price",
"instance": "Number",
"options": {
"required": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.
product_id
{
"path": "product_id",
"instance": "ObjectID",
"options": {
"link": "Product"
},
"validators": []
}tax_type
{
"path": "tax_type",
"instance": "String",
"options": {},
"validators": []
}updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}user_id
{
"path": "user_id",
"instance": "ObjectID",
"options": {
"link": "User"
},
"validators": []
}wallet_id
{
"path": "wallet_id",
"instance": "ObjectID",
"options": {
"link": "Wallet",
"index": true
},
"validators": []
}xero_account
{
"path": "xero_account",
"instance": "String",
"options": {},
"validators": []
}xero_id
{
"path": "xero_id",
"instance": "String",
"options": {},
"validators": []
}