import 'package:json_annotation/json_annotation.dart';

import '../../bean/message_info.dart';

part 'message_response.g.dart';

@JsonSerializable()
class MessageResponse {
  @JsonKey(name: 'count')
  int count;

  @JsonKey(name: 'list')
  List<MessageInfo>? list;

  MessageResponse(this.count, this.list);

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

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