dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
17 lines (16 loc) • 669 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromEntityDTO = void 0;
const index_js_1 = require("../../../entity/index.js");
const index_js_2 = require("../../../schema/actions/fromDTO/index.js");
const index_js_3 = require("../../../table/actions/fromDTO/index.js");
const fromEntityDTO = ({ entityName, schema, table, timestamps, ...entity }) => new index_js_1.Entity({
name: entityName,
schema: (0, index_js_2.fromSchemaDTO)(schema),
table: (0, index_js_3.fromTableDTO)(table),
timestamps: timestamps,
...entity,
// @ts-expect-error
computeKey: undefined
});
exports.fromEntityDTO = fromEntityDTO;