Constructor
new BucketModel(name)
Parameters:
| Name | Type | Description |
|---|---|---|
name | String | Model name. |
- Source
Example
const modelFoo = new BucketModel('foo');
modelFoo.parent = null;
modelFoo.fields = ['foo', 'bar', 'baz'];Methods
(static) isValidFields(arr) → {Boolean}
Verify the Modal field format.
Parameters:
| Name | Type | Description |
|---|---|---|
arr | Array.<String> | Fields names to validate. |
- Source
Returns:
- Type:
- Boolean
Example
const result = BucketModel.isValidFields(['foo', 'bar', biz', 'baz');(static) isValidName(value) → {Boolean}
Verify the Modal name format.
Parameters:
| Name | Type | Description |
|---|---|---|
value | String | Name value to validate. |
- Source
Returns:
- Type:
- Boolean
Example
const result = BucketModel.isValidName('foo');(static) isValidParent(value) → {Boolean}
Verify the Modal parent type.
Parameters:
| Name | Type | Description |
|---|---|---|
value | String | Parent value to validate. |
- Source
Returns:
- Type:
- Boolean
Example
const result = BucketModel.isValidParent(BucketModel);(static) isValidType(value) → {Boolean}
Verify the Modal output type.
Parameters:
| Name | Type | Description |
|---|---|---|
value | String | Check type value (options: base64|blob|json|text) |
- Source
Returns:
- Type:
- Boolean
Example
const result = BucketModel.isValidType('json');