import 'package:json_annotation/json_annotation.dart';

import '../../bean/member_info.dart';

part 'user_info_response.g.dart';

@JsonSerializable()
class UserInfoResponse {
  @JsonKey(name: 'userId')
  String? userId;

  @JsonKey(name: 'ssid')
  String? ssid;

  @JsonKey(name: 'deviceId')
  String deviceId;

  @JsonKey(name: 'phone')
  String? phone;

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

  @JsonKey(name: 'channelName')
  String? channelName;

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

  @JsonKey(name: 'birthday')
  String? birthday;

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

  @JsonKey(name: 'userIdOrSsid')
  String? userIdOrSsid;

  @JsonKey(name: 'imageUrl')
  String? imageUrl;

  @JsonKey(name: 'memberInfo')
  MemberInfo? memberInfo;

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

  @JsonKey(name: 'account')
  String? account;

  UserInfoResponse(this.name,
    this.userId,
    this.ssid,
    this.deviceId,
    this.phone,
    this.loginStatus,
    this.channelName,
    this.gender,
    this.birthday,
    this.intimacy,
    this.userIdOrSsid,
    this.memberInfo,
  );

  factory UserInfoResponse.fromJson(Map<String, dynamic> json) =>
      _$UserInfoResponseFromJson(json);
}
