cecon-interfaces
Version:
Interfaces de Projetos Cecon
70 lines (69 loc) • 2.86 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PayioActivationKeyEntity = void 0;
var activation_key_status_enum_1 = require("../enums/activation-key-status.enum");
var license_type_enum_1 = require("../enums/license-type.enum");
var PayioActivationKeyEntity = /** @class */ (function () {
function PayioActivationKeyEntity(data) {
// === CAMPOS PREENCHIDOS NA ATIVAÇÃO ===
// Data em que a chave foi ativada (null = não ativada)
this.activationAt = null;
// === REFERÊNCIAS DO SISTEMA ===
// ID do aplicativo (copiado do batch)
this.appId = null;
// Slug do aplicativo (copiado do batch)
this.appSlug = null;
// === REFERÊNCIA AO LOTE (fonte das configurações) ===
// ID do lote que gerou esta licença
this.batchId = '';
// ID da empresa (preenchido na ativação)
this.companyId = null;
this.companyName = null;
this.confirmationKey = false;
// === AUDITORIA ===
// Data de criação da chave
this.createdAt = new Date();
// ID do dispositivo (preenchido na ativação)
this.deviceId = null;
// === DADOS DE DISTRIBUIÇÃO (copiados do batch) ===
// ID do distribuidor
this.distributorId = '';
this.distributorName = '';
this.expiresAt = null;
// Dias de tolerância (copiado do batch)
this.gracePeriodDays = 0;
// Hash da máquina que consumiu a licença
this.hardwareFingerprint = null;
// Identificador único da chave (UUID)
this.id = '';
// data da instalaçao do dispositivo
this.installationAt = null;
// A chave de ativação em si (ex.: "PAYIO-XXXXX-XXXXX-XXXXX")
this.key = null;
// === DADOS COPIADOS DO LOTE (para performance) ===
// Tipo de licença (copiado do batch)
this.licenseType = license_type_enum_1.EPayioLicenseType.TRIAL;
this.logs = [];
// Metadados livres para suporte
this.notes = null;
// Status da chave
this.status = activation_key_status_enum_1.EPayioActivationKeyStatus.AVAILABLE;
// Tags para categorização
this.tags = [];
this.updatedAt = new Date();
// Período de validade em meses (copiado do batch)
this.validityPeriodMonths = 12; // 1 ano;
this.validityTrialPeriodDays = 0;
// Versão do software (copiado do batch)
this.versionConstraint = [];
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return PayioActivationKeyEntity;
}());
exports.PayioActivationKeyEntity = PayioActivationKeyEntity;