import 'package:json_annotation/json_annotation.dart'; part 'userinfo.g.dart'; @JsonSerializable() class UserGroupMembership { String group; String expiry; UserGroupMembership({ required this.group, required this.expiry, }); factory UserGroupMembership.fromJson(Map json) => _$UserGroupMembershipFromJson(json); Map toJson() => _$UserGroupMembershipToJson(this); } @JsonSerializable() class UserAcceptLang { double q; @JsonKey(name: '*') String langCode; UserAcceptLang({ required this.q, required this.langCode, }); factory UserAcceptLang.fromJson(Map json) => _$UserAcceptLangFromJson(json); Map toJson() => _$UserAcceptLangToJson(this); } @JsonSerializable() class MetaUserInfo { int id; String name; List? groups; List? groupmemberships; List? implicitgroups; List? rights; Map>? changeablegroups; Map? options; int? editcount; String? realname; String? email; DateTime? emailauthenticated; DateTime? registrationdate; List? acceptlang; int? unreadcount; Map? centralids; Map? attachedlocal; DateTime? latestcontrib; MetaUserInfo({ required this.id, required this.name, this.groups, this.groupmemberships, this.implicitgroups, this.rights, this.changeablegroups, this.options, this.editcount, this.realname, this.email, this.emailauthenticated, this.registrationdate, this.acceptlang, this.unreadcount, this.centralids, this.attachedlocal, this.latestcontrib, }); factory MetaUserInfo.fromJson(Map json) => _$MetaUserInfoFromJson(json); Map toJson() => _$MetaUserInfoToJson(this); } @JsonSerializable() class MetaUserInfoResponse { MetaUserInfo userinfo; Map? useravatar; MetaUserInfoResponse({ required this.userinfo, this.useravatar, }); factory MetaUserInfoResponse.fromJson(Map json) => _$MetaUserInfoResponseFromJson(json); Map toJson() => _$MetaUserInfoResponseToJson(this); }