import 'package:azlistview/azlistview.dart'; import 'package:sport/bean/user_info.dart'; import 'package:sport/services/Converter.dart'; class UserFriend extends ISuspensionBean { int? uid; String? isFriends; int? isIgnore; String? groups; String? createdAt; String? updatedAt; UserInfo? socialInfo; String? makeFrom; String? name; String? avatar; String? relation; UserFriend({ this.uid, this.isFriends, this.groups, this.createdAt, this.updatedAt, this.socialInfo, this.makeFrom, this.name, this.avatar, this.relation }); UserFriend.fromJson(Map json) { uid = Converter.toInt(json['uid']); isFriends = json['is_friends']; isIgnore = Converter.toInt(json['is_ignore']); groups = json['groups']; createdAt = json['created_at']; updatedAt = json['updated_at']; socialInfo = json['socialInfo'] != null ? new UserInfo.fromJson(json['socialInfo']) : null; makeFrom = json['make_from']; name = json['name']; avatar = json['avatar']; relation = json['relation']; } Map toJson() { final Map data = new Map(); data['uid'] = this.uid; data['is_friends'] = this.isFriends; data['groups'] = this.groups; data['created_at'] = this.createdAt; data['updated_at'] = this.updatedAt; if (this.socialInfo != null) { data['socialInfo'] = this.socialInfo!.toJson(); } data['make_from'] = this.makeFrom; data['name'] = this.name; data['avatar'] = this.avatar; data['relation'] = this.relation; return data; } @override String? getSuspensionTag() => '$uid'; } class NewFriend { int? id; String? name; String? level; String? score; String? isBan; String? provinceId; String? cityId; String? districtId; String? gender; String? age; String? avatar; String? city; NewFriend( this.id, this.name, this.level, this.score, this.isBan, this.provinceId, this.cityId, this.districtId, this.gender, this.age, this.avatar, this.city); NewFriend.fromJson(Map json) { id = Converter.toInt(json['id']); name = json['name']; level = json['level']; score = json['score']; isBan = json['is_ban']; provinceId = json['province_id']; cityId = json['city_id']; districtId = json['district_id']; gender = json['gender']; age = json['age']; avatar = json['avatar']; city = json['city']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; data['level'] = this.level; data['isBan'] = this.isBan; data['provinceId'] = this.provinceId; data['cityId'] = this.cityId; data['districtId'] = this.districtId; data['gender'] = this.gender; data['age'] = this.age; data['avatar'] = this.avatar; data['city'] = this.city; return data; } }