class User {
  final int id;
  final String username;
  final String? avatarUrl;

  User({required this.id, required this.username, this.avatarUrl});

  factory User.fromJson(Map<String, dynamic> json) {
    return User(
      id: json['userid'],
      username: json['user'],
      avatarUrl: json['avatar'] != null
          ? 'https://f0ck.me/t/${json['avatar']}.webp'
          : null,
    );
  }
}
