fase(2): shared infrastructure layer
This commit is contained in:
4
dist/shared/domain/UniqueId.js
vendored
4
dist/shared/domain/UniqueId.js
vendored
@@ -1,12 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.UniqueId = void 0;
|
||||
const uuid_1 = require("uuid");
|
||||
const crypto_1 = require("crypto");
|
||||
class UniqueId {
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
}
|
||||
static create() { return new UniqueId((0, uuid_1.v4)()); }
|
||||
static create() { return new UniqueId((0, crypto_1.randomUUID)()); }
|
||||
static from(value) { return new UniqueId(value); }
|
||||
toString() { return this.value; }
|
||||
equals(other) {
|
||||
|
||||
Reference in New Issue
Block a user