123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- 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;
- }
- }
|