Database Name | Database Type | Collection Name |
---|
%tenant_code%_multitenant | MongoDB | products |
Record Explanation
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
| _id | Mongo ID | YES | YES | YES | Mongo Record ID |
| code | String | YES | YES | YES | Product Code |
| name | String | YES | NO | NO | Product Name |
| description | String | NO | NO | NO | Product Description |
| scope | Object | NO | NO | NO | Product ACL and permission |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
acl | Object | NO | NO | NO |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%environment_name% | Object | NO | NO | NO |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%service_name% | Object | NO | NO | NO |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%version_name% | Object | NO | NO | NO |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
access | Boolean | NO | NO | NO |
| apiPermission | String | NO | NO | NO | "enum": ["restricted"] | get - post - put - put | Array | NO | NO | NO |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
group | String | NO | NO | NO |
| apis | Object | NO | NO | NO |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%api% | Object | NO | NO | NO |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
access | Boolean | NO | NO | NO |
|
|
|
|
|
|
|
|
|
| packages | Object | NO | NO | NO | Packages in product |
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
packageName | Object | NO | NO | NO |
| code | String | NO | NO | NO | Package Code | name | String | NO | NO | NO | Package Name | Description | String | NO | NO | NO | Package Description | acl | Object | NO | NO | NO |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%environment_name% | Object | YES | YES | NO |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%service_name% | Object | NO | YES | NO |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
version | String | YES | NO | NO |
| %http_verb% | Array | YES | NO | No |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
%group_name% | String | NO | NO | NO |
|
|
|
|
|
|
Sample
The below Product has two packages. package 1 and PACK 2
Code Block |
---|
language | js |
---|
title | Record Sample |
---|
|
{
_id: ObjectId("5d779088f13f2c08f8cdc034"),
code: "TEST2",
name: "Test 2 Product",
description: "this is a description for test 2 product",
console: false,
packages: [
{
code: "TEST2_NEWS",
name: "news package",
description: "this is a description for test 2 product news package",
acl: {
dashboard: {
oauth: [
{
version: "1",
get: [
"Guest"
],
post: [
"Guest",
"Tokenization"
],
delete: [
"Tokenization"
]
}
]
}
},
_TTL: NumberInt(86400000)
},
{
code: "TEST2_NEW",
name: "new package",
description: "this is a description for test 2 product new package",
acl: {
dashboard: {
urac: [
{
version: "2",
post: [
"Guest Password Settings"
],
get: [
"Guest Password Settings",
"Guest Email Validation"
]
}
]
}
},
_TTL: NumberInt(86400000)
}
]
} |