18 lines
453 B
JavaScript
18 lines
453 B
JavaScript
"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;
|