import 'package:json_annotation/json_annotation.dart';

part 'member_info.g.dart';

@JsonSerializable()
class MemberInfo {
  @JsonKey(name: 'isMember')
  bool isMember;

  @JsonKey(name: 'endTimestamp')
  int? endTimestamp;

  @JsonKey(name: 'permanent')
  bool? permanent;

  MemberInfo(this.isMember, this.endTimestamp, this.permanent);

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

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