@webiny/api-headless-cms-ddb-es
Version:
DynamoDB and Elasticsearch storage operations plugin for Headless CMS API.
66 lines (64 loc) • 1.15 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createGroupEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createGroupEntity = params => {
const {
table,
attributes,
entityName
} = params;
return new _toolbox.Entity({
name: entityName,
table,
attributes: {
PK: {
partitionKey: true
},
SK: {
sortKey: true
},
TYPE: {
type: "string"
},
webinyVersion: {
type: "string"
},
id: {
type: "string"
},
name: {
type: "string"
},
slug: {
type: "string"
},
locale: {
type: "string"
},
description: {
type: "string"
},
icon: {
type: "string"
},
createdBy: {
type: "map"
},
createdOn: {
type: "string"
},
savedOn: {
type: "string"
},
tenant: {
type: "string"
},
...(attributes || {})
}
});
};
exports.createGroupEntity = createGroupEntity;
//# sourceMappingURL=group.js.map