@webiny/api-page-builder-so-ddb
Version:
The DynamoDB storage operations Webiny Page Builder API.
57 lines (55 loc) • 1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createMenuEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createMenuEntity = params => {
const {
entityName,
attributes,
table
} = params;
return new _toolbox.Entity({
name: entityName,
table,
attributes: {
PK: {
partitionKey: true
},
SK: {
sortKey: true
},
TYPE: {
type: "string"
},
title: {
type: "string"
},
slug: {
type: "string"
},
description: {
type: "string"
},
items: {
type: "list"
},
createdOn: {
type: "string"
},
createdBy: {
type: "map"
},
tenant: {
type: "string"
},
locale: {
type: "string"
},
...(attributes || {})
}
});
};
exports.createMenuEntity = createMenuEntity;
//# sourceMappingURL=menuEntity.js.map