mirror of
https://github.com/PHIDIAS0303/ClusterChatSync.git
synced 2026-11-23 08:03:12 +09:00
1.0.4 RC2
This commit is contained in:
1 parent
8ba2c9bffa
commit
7a9165bd35
1 file changed
+2
-2
@@ -16,13 +16,13 @@ export class ChatEvent {
|
|||||||
public message: string,
|
public message: string,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
static json_schema = Type.Object({
|
static jsonSchema = Type.Object({
|
||||||
'instance_name': Type.String(),
|
'instance_name': Type.String(),
|
||||||
'datetime': Type.String(),
|
'datetime': Type.String(),
|
||||||
'message': Type.String(),
|
'message': Type.String(),
|
||||||
});
|
});
|
||||||
|
|
||||||
static fromJSON(json: Static<typeof ChatEvent.json_schema>) {
|
static fromJSON(json: Static<typeof ChatEvent.jsonSchema>) {
|
||||||
return new this(json.instance_name, json.datetime, json.message);
|
return new this(json.instance_name, json.datetime, json.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user