@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
66 lines (64 loc) • 1.16 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createSubmissionEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createSubmissionEntity = params => {
const {
table,
entityName,
attributes
} = params;
return new _toolbox.Entity({
table,
name: entityName,
attributes: {
PK: {
partitionKey: true
},
SK: {
sortKey: true
},
id: {
type: "string"
},
TYPE: {
type: "string"
},
data: {
type: "map"
},
meta: {
type: "map"
},
form: {
type: "map"
},
logs: {
type: "list"
},
createdOn: {
type: "string"
},
savedOn: {
type: "string"
},
ownedBy: {
type: "map"
},
tenant: {
type: "string"
},
locale: {
type: "string"
},
webinyVersion: {
type: "string"
},
...(attributes || {})
}
});
};
exports.createSubmissionEntity = createSubmissionEntity;
//# sourceMappingURL=submission.js.map