@gobolt/models
Version:
This is a shared repository that includes models that should be shared across all BoxKnight services. Do not include anything for the controller, service or repository layers of your application in this package.
108 lines • 5.11 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Pickup = void 0;
const dynamodb_data_mapper_1 = require("@aws/dynamodb-data-mapper");
const dynamodb_data_mapper_annotations_1 = require("@aws/dynamodb-data-mapper-annotations");
const class_transformer_1 = require("class-transformer");
const cls_rtracer_1 = require("cls-rtracer");
const address_1 = require("./address");
const dtoAddress_1 = require("./dtoAddress");
const pickupRecipientName_1 = require("./pickupRecipientName");
const recipient_1 = require("./recipient");
const task_1 = require("./task");
let Pickup = class Pickup {
constructor() {
this.tasks = new Array();
}
};
exports.Pickup = Pickup;
__decorate([
(0, dynamodb_data_mapper_annotations_1.hashKey)({ defaultProvider: () => cls_rtracer_1.id.toString() }),
__metadata("design:type", String)
], Pickup.prototype, "id", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ defaultProvider: () => new Date() }),
__metadata("design:type", Date)
], Pickup.prototype, "createdAt", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", String)
], Pickup.prototype, "merchantId", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ memberType: (0, dynamodb_data_mapper_1.embed)(recipient_1.Recipient) }),
(0, class_transformer_1.Type)(() => recipient_1.Recipient),
__metadata("design:type", recipient_1.Recipient)
], Pickup.prototype, "recipient", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ memberType: (0, dynamodb_data_mapper_1.embed)(dtoAddress_1.DTOAddress) }),
(0, class_transformer_1.Type)(() => dtoAddress_1.DTOAddress),
__metadata("design:type", Object)
], Pickup.prototype, "dtoRecipientAddress", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ memberType: (0, dynamodb_data_mapper_1.embed)(address_1.Address) }),
(0, class_transformer_1.Type)(() => address_1.Address),
__metadata("design:type", address_1.Address)
], Pickup.prototype, "recipientAddress", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", String)
], Pickup.prototype, "createdBy", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ defaultProvider: () => true }),
__metadata("design:type", Boolean)
], Pickup.prototype, "signatureRequired", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ defaultProvider: () => true }),
__metadata("design:type", Boolean)
], Pickup.prototype, "scanningRequired", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)({ defaultProvider: () => true }),
__metadata("design:type", Boolean)
], Pickup.prototype, "validAddress", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", Number)
], Pickup.prototype, "completeAfter", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", Number)
], Pickup.prototype, "completeBefore", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", String)
], Pickup.prototype, "notes", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", Array)
], Pickup.prototype, "orderIds", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", Number)
], Pickup.prototype, "packageCount", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
(0, class_transformer_1.Type)(() => task_1.Task),
__metadata("design:type", Array)
], Pickup.prototype, "tasks", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
(0, class_transformer_1.Type)(() => pickupRecipientName_1.PickupRecipientName),
__metadata("design:type", Array)
], Pickup.prototype, "recipientNames", void 0);
__decorate([
(0, dynamodb_data_mapper_annotations_1.attribute)(),
__metadata("design:type", String)
], Pickup.prototype, "appointmentId", void 0);
exports.Pickup = Pickup = __decorate([
(0, dynamodb_data_mapper_annotations_1.table)('Pickups')
], Pickup);
//# sourceMappingURL=pickup.js.map