import 'package:agora_chat_demo/models/base_model.dart'; class UserModel extends BaseModel { String username; String password; String nickname; UserModel( {required this.username, required this.password, required this.nickname}); UserModel.fromJson(Map json) : username = json['username'], password = json['password'], nickname = json['nickname']; } class UserEntity { List? users; int? errorCode; String? errorMsg; UserEntity({this.users, this.errorCode, this.errorMsg}); UserEntity.fromJson(Map json) { if (json['users'] != null) { users = []; json['users'].forEach((v) { users!.add(UserModel.fromJson(v)); }); } errorCode = json['errorCode']; errorMsg = json['errorMsg']; } }