import 'package:json_annotation/json_annotation.dart';

part 'WebSocketMessage.g.dart';

@JsonSerializable()
class WebSocketMessage {
  String path;
  int? type;
  dynamic data;

  WebSocketMessage({required this.path, this.type, this.data});

  static WebSocketMessage fromJson(Map<String, dynamic> json) =>
      _$WebSocketMessageFromJson(json);
  Map<String, dynamic> toJson() => _$WebSocketMessageToJson(this);
}
