@webiny/api-form-builder-so-ddb-es
Version:
[](https://www.npmjs.com/package/@webiny/api-form-builder-so-ddb-es) [](https://www.npmjs.com/package/@webiny
96 lines (94 loc) • 1.62 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createFormEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createFormEntity = params => {
const {
table,
entityName,
attributes
} = params;
return new _toolbox.Entity({
table,
name: entityName,
attributes: {
PK: {
partitionKey: true
},
SK: {
sortKey: true
},
TYPE: {
type: "string"
},
id: {
type: "string"
},
formId: {
type: "string"
},
tenant: {
type: "string"
},
locale: {
type: "string"
},
createdBy: {
type: "map"
},
ownedBy: {
type: "map"
},
savedOn: {
type: "string"
},
createdOn: {
type: "string"
},
name: {
type: "string"
},
slug: {
type: "string"
},
version: {
type: "number"
},
locked: {
type: "boolean"
},
published: {
type: "boolean"
},
publishedOn: {
type: "string"
},
status: {
type: "string"
},
fields: {
type: "list"
},
steps: {
type: "list"
},
stats: {
type: "map"
},
settings: {
type: "map"
},
triggers: {
type: "map"
},
webinyVersion: {
type: "string"
},
...(attributes || {})
}
});
};
exports.createFormEntity = createFormEntity;
//# sourceMappingURL=form.js.map