@webiny/api-tenancy-so-ddb
Version:
Security storage operations.
39 lines (37 loc) • 696 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createTenantEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createTenantEntity = ({
entityName,
table
}) => {
return new _toolbox.Entity({
table,
name: entityName,
attributes: {
PK: {
partitionKey: true
},
SK: {
sortKey: true
},
GSI1_PK: {
type: "string"
},
GSI1_SK: {
type: "string"
},
TYPE: {
type: "string"
},
data: {
type: "map"
}
}
});
};
exports.createTenantEntity = createTenantEntity;
//# sourceMappingURL=tenantEntity.js.map