UNPKG

skailan-contacts

Version:

Servicio de gestión de contactos para Skailan

33 lines 886 B
export class ContactTag { contactId; tagId; organizationId; createdAt; constructor(contactId, tagId, organizationId, createdAt) { this.contactId = contactId; this.tagId = tagId; this.organizationId = organizationId; this.createdAt = createdAt; this.validate(); } validate() { if (!this.contactId) { throw new Error('Contact ID is required'); } if (!this.tagId) { throw new Error('Tag ID is required'); } if (!this.organizationId) { throw new Error('Organization ID is required'); } } toJSON() { return { contactId: this.contactId, tagId: this.tagId, organizationId: this.organizationId, createdAt: this.createdAt }; } } //# sourceMappingURL=ContactTag.js.map