import 'package:freezed_annotation/freezed_annotation.dart';

part 'guild_model.freezed.dart';
part 'guild_model.g.dart';

@freezed
abstract class GuildModel with _$GuildModel {
  const factory GuildModel({
    String? key,
    String? guildsName,
    bool? steward,
    User? user,
  }) = _GuildModel;

  factory GuildModel.fromJson(Map<String, dynamic> json) =>
      _$GuildModelFromJson(json);
}

@freezed
abstract class User with _$User {
  const factory User({
    String? fullname,
    String? mobile,
    String? city,
  }) = _User;

  factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}