UNPKG

cecon-interfaces

Version:
39 lines (38 loc) 1.24 kB
"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) { // #region Properties (10) this.info = new general_1.MobyoInfoEntity(); 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; if (data) { for (var key in data) { if (data.hasOwnProperty(key) && key in this) { this[key] = data[key]; } } } } return VoucherEntity; }()); exports.VoucherEntity = VoucherEntity;