fase(15): reporting module with pdf generation
This commit is contained in:
18
dist/modules/reporting/domain/value-objects/ReportStatus.js
vendored
Normal file
18
dist/modules/reporting/domain/value-objects/ReportStatus.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReportStatus = void 0;
|
||||
const ValueObject_1 = require("../../../../shared/domain/ValueObject");
|
||||
class ReportStatus extends ValueObject_1.ValueObject {
|
||||
get value() { return this.props.value; }
|
||||
static pending() { return new ReportStatus({ value: 'pending' }); }
|
||||
static generating() { return new ReportStatus({ value: 'generating' }); }
|
||||
static ready() { return new ReportStatus({ value: 'ready' }); }
|
||||
static failed() { return new ReportStatus({ value: 'failed' }); }
|
||||
static fromString(s) {
|
||||
if (s === 'pending' || s === 'generating' || s === 'ready' || s === 'failed') {
|
||||
return new ReportStatus({ value: s });
|
||||
}
|
||||
throw new Error(`Invalid report status: ${s}`);
|
||||
}
|
||||
}
|
||||
exports.ReportStatus = ReportStatus;
|
||||
Reference in New Issue
Block a user