import 'package:json_annotation/json_annotation.dart';

part 'base_message.g.dart';

@JsonSerializable()
class BaseMessage {
  @JsonKey(name: 'cmd')
  String? cmd;

  @JsonKey(name: 'body')
  String? data;

  BaseMessage({this.cmd, this.data});

  factory BaseMessage.fromJson(Map<String, dynamic> json) =>
      _$BaseMessageFromJson(json);

  Map<String, dynamic> toJson() => _$BaseMessageToJson(this);
}
