"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const metadata_helper_1 = require("../../decorator/metadata/metadata-helper");
class BaseRequest {
    constructor(dynamoRx, modelClazz, tableName) {
        this.dynamoRx = dynamoRx;
        if (modelClazz === null || modelClazz === undefined) {
            throw new Error("please provide the model clazz for the request, won't work otherwise");
        }
        this.modelClazz = modelClazz;
        this.params = {
            TableName: tableName,
        };
    }
    get metaData() {
        if (!this._metadata) {
            this._metadata = metadata_helper_1.MetadataHelper.get(this.modelClazz);
        }
        return this._metadata;
    }
}
exports.BaseRequest = BaseRequest;
//# sourceMappingURL=base.request.js.map