import 'package:chat/models/user_info_model.dart';

class AuthModel {
  String userToken;
  String userSig;
  String userID;
  UserInfoModel userInfo;

  AuthModel({
    required this.userToken,
    required this.userID,
    required this.userSig,
    required this.userInfo,
  });

  factory AuthModel.fromJson(Map<String, dynamic> json) => AuthModel(
        userToken: json['access_token'],
        userID: json['user_id'].toString(),
        userSig: json['user_sig'],
        userInfo: UserInfoModel.fromJson(json['user_info']),
      );
}
