fromJson static method

TCICJoinClassRepModel fromJson(
  1. Map<String, dynamic> json
)
override

Implementation

static TCICJoinClassRepModel fromJson(Map<String, dynamic> json) {
  return TCICJoinClassRepModel(
    errorCode: json['error_code'] ?? 0,
    errorMsg: json['error_msg'] ?? '',
    requestId: json['request_id'] ?? '',
    interval: json['interval'] ?? 0,
    userSig: json['user_sig'] ?? '',
    members:
        json['members'] != null
            ? (json['members'] as List)
                .map((e) => Member.fromJson(e))
                .toList()
            : [],
    timestamp: json['timestamp'] != null ? int.parse(json['timestamp'].toString()) : 0,
    streams:
        json['streams'] != null
            ? (json['streams'] as List)
                .map((e) => LiveStream.fromJson(e))
                .toList()
            : [],
    permissionListSeq: json['permission_list_seq'] ?? 0,
    streamListSeq: json['stream_list_seq'] ?? 0,
    joinType: json['join_type'] ?? 0,
    subUserSig: json['sub_user_sig'] ?? '',
    like: json['like'] ?? 0,
    onlineNumber: json['online_number'] ?? 0,
    nanoTimestamp: json['nano_timestamp'] ?? '',
    studentOnlineNumber: json['student_online_number'] ?? 0,
  );
}