Model vouchers
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| admin | x | x | x | x |
| owner | x | x | x | x |
| user | x | 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 | | |
| code | String | | | | | x | |
| createdAt | Date | | | | | | |
| reader_id | ObjectID | reader | | | x | | |
| updatedAt | Date | | | | | | |
| valid_from | Date | | | | x | | |
| valid_to | Date | | | | x | | |
| vouchertype_id | ObjectID | vouchertype | | | x | | |
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": []
}code
{
"path": "code",
"instance": "String",
"options": {
"unique": true
},
"validators": []
}createdAt
{
"path": "createdAt",
"instance": "Date",
"options": {
"immutable": true
},
"validators": []
}reader_id
{
"path": "reader_id",
"instance": "ObjectID",
"options": {
"link": "reader",
"index": true
},
"validators": []
}updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}valid_from
{
"path": "valid_from",
"instance": "Date",
"options": {
"index": true
},
"validators": []
}valid_to
{
"path": "valid_to",
"instance": "Date",
"options": {
"index": true
},
"validators": []
}vouchertype_id
{
"path": "vouchertype_id",
"instance": "ObjectID",
"options": {
"link": "vouchertype",
"index": true
},
"validators": []
}