scheunemann-interfaces
Version:
Interfaces de Projetos Scheunemann
38 lines (37 loc) • 1.18 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VoucherEntity = void 0;
var general_1 = require("../../general");
var enums_1 = require("../enums");
var VoucherEntity = /** @class */ (function () {
function VoucherEntity(data) {
this.concludedAt = null;
this.createdAt = new Date();
this.id = '';
this.isPublic = false;
this.key = '';
this.name = '';
this.activatedAt = null;
this.rules = [];
this.type = general_1.EDiscountType.PERCENT;
this.amount = 0;
this.sponsorship = [];
this.status = enums_1.EVoucherStatus.PLACED;
this.targetsId = [];
this.targetType = enums_1.EVoucherTargetTypes.CART;
this.updatedAt = new Date();
this.limit = 0;
this.isExclusive = false;
this.usedCount = 0;
this.active = true;
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return VoucherEntity;
}());
exports.VoucherEntity = VoucherEntity;