UNPKG

skailan-crm

Version:

Servicio de CRM y gestión de ventas para Skailan

45 lines 1.29 kB
export class Quote { id; organizationId; opportunityId; quoteNumber; status; totalAmount; version; signedAt; signedBy; createdAt; updatedAt; constructor(id, organizationId, opportunityId, quoteNumber, status, totalAmount, version, signedAt, signedBy, createdAt, updatedAt) { this.id = id; this.organizationId = organizationId; this.opportunityId = opportunityId; this.quoteNumber = quoteNumber; this.status = status; this.totalAmount = totalAmount; this.version = version; this.signedAt = signedAt; this.signedBy = signedBy; this.createdAt = createdAt; this.updatedAt = updatedAt; } updateStatus(newStatus) { this.status = newStatus; this.updatedAt = new Date(); } updateTotalAmount(newTotalAmount) { this.totalAmount = newTotalAmount; this.updatedAt = new Date(); } incrementVersion() { this.version++; this.updatedAt = new Date(); } markAsSigned(signedBy) { this.signedAt = new Date(); this.signedBy = signedBy; this.status = 'Accepted'; // Assuming accepted when signed this.updatedAt = new Date(); } } //# sourceMappingURL=Quote.js.map