Model discounts
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| finance | x | x | x | x |
| line_manager | x | x | x | x |
| admin | | 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 | | |
| apply_to | Array of String | | | [Function] | | | |
| comment | String | | | | | | |
| createdAt | Date | | | | | | |
| date_created | Date | | | [Function] | | | |
| date_end | Date | | | | x | | |
| date_start | Date | | | [Function] | x | | |
| description | String | | | | | | |
| discount | Number | | | 0 | | | |
| license_id | ObjectID | License | | | | | |
| lineitem_id | ObjectID | LineItem | | | | | |
| organisation_id | ObjectID | Organisation | | | x | | |
| producttype_id | ObjectID | ProductType | | | x | | |
| updatedAt | Date | | | | | | |
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": []
}apply_to
{
"path": "apply_to",
"instance": "Array",
"options": {
"type": [
{
"validate": {}
}
]
},
"validators": [],
"defaultValue": "[Function]",
"arrayType": "String"
}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": {
"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)."
}
],
"defaultValue": "[Function]"
}Validators
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
description
{
"path": "description",
"instance": "String",
"options": {},
"validators": []
}discount
{
"path": "discount",
"instance": "Number",
"options": {
"default": 0
},
"validators": [],
"defaultValue": 0
}license_id
{
"path": "license_id",
"instance": "ObjectID",
"options": {
"link": "License"
},
"validators": []
}lineitem_id
{
"path": "lineitem_id",
"instance": "ObjectID",
"options": {
"link": "LineItem"
},
"validators": []
}organisation_id
{
"path": "organisation_id",
"instance": "ObjectID",
"options": {
"link": "Organisation",
"index": true
},
"validators": []
}producttype_id
{
"path": "producttype_id",
"instance": "ObjectID",
"options": {
"link": "ProductType",
"default": null,
"index": true
},
"validators": [],
"defaultValue": null
}updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}