Model otps
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| admin | x | x | x | x |
| api | x | x | x | x |
| owner | | x | | |
Fields
| Name | Type | Link | Maps To | Default | Indexed? | Unique? | Required? |
|---|
| __v | Number | | | | | | |
| _deleted | Boolean | | | false | x | | |
| _id | ObjectID | | | [Function] | | | |
| _owner_id | ObjectID | | | | | | |
| _updated_by_id | ObjectID | User | _updated_by | | x | | |
| createdAt | Date | | | | | | |
| created_at | Date | | | [Function] | x | | |
| description | String | | | | | | |
| expires_at | Date | | | | x | | x |
| pin | String | | | | x | | x |
| redeemed_amount | Number | | | | | | |
| redeemed_at | Date | | | | | | |
| redeemed_by_apikey_id | ObjectID | APIKey | | | | | |
| redeemed_cred_type | String | | | | | | |
| status | String | | | active | x | | |
| transaction_id | String | | | | x | | |
| updatedAt | Date | | | | | | |
| user_id | ObjectID | User | | | x | | 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": {},
"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": []
}created_at
{
"path": "created_at",
"instance": "Date",
"options": {
"index": true
},
"validators": [],
"defaultValue": "[Function]"
}description
{
"path": "description",
"instance": "String",
"options": {},
"validators": []
}expires_at
{
"path": "expires_at",
"instance": "Date",
"options": {
"required": true,
"index": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.
pin
{
"path": "pin",
"instance": "String",
"options": {
"required": true,
"index": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.
redeemed_amount
{
"path": "redeemed_amount",
"instance": "Number",
"options": {},
"validators": []
}redeemed_at
{
"path": "redeemed_at",
"instance": "Date",
"options": {},
"validators": []
}redeemed_by_apikey_id
{
"path": "redeemed_by_apikey_id",
"instance": "ObjectID",
"options": {
"link": "APIKey"
},
"validators": []
}redeemed_cred_type
{
"path": "redeemed_cred_type",
"instance": "String",
"options": {},
"validators": []
}status
{
"path": "status",
"instance": "String",
"options": {
"enum": [
"active",
"redeemed",
"expired",
"superseded"
],
"default": "active",
"index": true
},
"validators": [
{
"message": "`{VALUE}` is not a valid enum value for path `{PATH}`."
}
],
"defaultValue": "active"
}Validators
- : `{VALUE}` is not a valid enum value for path `{PATH}`.
transaction_id
{
"path": "transaction_id",
"instance": "String",
"options": {
"index": true
},
"validators": []
}updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}user_id
{
"path": "user_id",
"instance": "ObjectID",
"options": {
"index": true,
"required": true,
"link": "User"
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.