fase(1): shared domain building blocks

This commit is contained in:
debian
2026-03-04 16:22:42 -05:00
parent 2a93f1f5b7
commit 0e6c0c3655
28 changed files with 413 additions and 19 deletions

17
dist/shared/domain/Entity.js vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Entity = void 0;
const UniqueId_1 = require("./UniqueId");
class Entity {
constructor(props, id) {
this._id = id ?? UniqueId_1.UniqueId.create();
this.props = props;
}
get id() { return this._id; }
equals(other) {
if (!other)
return false;
return this._id.equals(other._id);
}
}
exports.Entity = Entity;