UNPKG

@webiny/api-page-builder-so-ddb

Version:

The DynamoDB storage operations Webiny Page Builder API.

57 lines (55 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createCategoryEntity = void 0; var _toolbox = require("@webiny/db-dynamodb/toolbox"); const createCategoryEntity = params => { const { entityName, attributes, table } = params; return new _toolbox.Entity({ name: entityName, table, attributes: { PK: { partitionKey: true }, SK: { sortKey: true }, TYPE: { type: "string" }, name: { type: "string" }, slug: { type: "string" }, url: { type: "string" }, layout: { type: "string" }, createdOn: { type: "string" }, createdBy: { type: "map" }, tenant: { type: "string" }, locale: { type: "string" }, ...(attributes || {}) } }); }; exports.createCategoryEntity = createCategoryEntity; //# sourceMappingURL=categoryEntity.js.map