12345678910111213141516171819202122 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var uuid_1 = require("../utils/uuid");
- var MsgBase = (function () {
- function MsgBase() {
- this.id = uuid_1.uuid();
- }
- MsgBase.prototype.isValid = function () {
- if (!this.from || !this.to) {
- return false;
- }
- return true;
- };
- MsgBase.createMsg = function (baseMsg) {
- var msg = new MsgBase();
- Object.assign(msg, baseMsg);
- return msg;
- };
- return MsgBase;
- }());
- exports.MsgBase = MsgBase;
|