Model contracts
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 | | |
| createdAt | Date | | | | | | |
| date_sent | Date | | | | | | |
| date_signed | Date | | | | | | |
| filename | String | | | | | | |
| organisation_id | ObjectID | Organisation | | | x | | |
| reference | String | | | | | | |
| sent | Boolean | | | | | | |
| signed | Boolean | | | | | | |
| type | String | | | | | | |
| updatedAt | Date | | | | | | |
| user_id | ObjectID | User | | | | | |
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": []
}createdAt
{
"path": "createdAt",
"instance": "Date",
"options": {
"immutable": true
},
"validators": []
}date_sent
{
"path": "date_sent",
"instance": "Date",
"options": {},
"validators": []
}date_signed
{
"path": "date_signed",
"instance": "Date",
"options": {},
"validators": []
}filename
{
"path": "filename",
"instance": "String",
"options": {},
"validators": []
}organisation_id
{
"path": "organisation_id",
"instance": "ObjectID",
"options": {
"link": "Organisation",
"index": true
},
"validators": []
}reference
{
"path": "reference",
"instance": "String",
"options": {},
"validators": []
}sent
{
"path": "sent",
"instance": "Boolean",
"options": {},
"validators": []
}signed
{
"path": "signed",
"instance": "Boolean",
"options": {},
"validators": []
}type
{
"path": "type",
"instance": "String",
"options": {
"validate": {}
},
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`"
}
]
}Validators
- : Validator failed for path `{PATH}` with value `{VALUE}`
updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}user_id
{
"path": "user_id",
"instance": "ObjectID",
"options": {
"link": "User"
},
"validators": []
}