import 'package:freezed_annotation/freezed_annotation.dart';

part 'guild_profile.freezed.dart';
part 'guild_profile.g.dart';

@freezed
abstract class GuildProfile with _$GuildProfile {
  const factory GuildProfile({
    int? id,
    User? user,
    Address? address,
    GuildAreaActivity? guild_area_activity,
    GuildTypeActivity? guild_type_activity,
    List<dynamic>? kill_house,
    List<dynamic>? steward_kill_house,
    List<dynamic>? stewards,
    GetPosStatus? get_pos_status,
    String? key,
    String? create_date,
    String? modify_date,
    bool? trash,
    String? user_id_foreign_key,
    String? address_id_foreign_key,
    String? user_bank_id_foreign_key,
    String? wallet_id_foreign_key,
    String? provincial_government_id_key,
    dynamic identity_documents,
    bool? active,
    int? city_number,
    String? city_name,
    String? guilds_id,
    String? license_number,
    String? guilds_name,
    String? phone,
    String? type_activity,
    String? area_activity,
    int? province_number,
    String? province_name,
    bool? steward,
    bool? has_pos,
    dynamic centers_allocation,
    dynamic kill_house_centers_allocation,
    dynamic allocation_limit,
    bool? limitation_allocation,
    String? registerar_role,
    String? registerar_fullname,
    String? registerar_mobile,
    bool? kill_house_register,
    bool? steward_register,
    bool? guilds_room_register,
    bool? pos_company_register,
    String? province_accept_state,
    String? province_message,
    String? condition,
    String? description_condition,
    bool? steward_active,
    dynamic steward_allocation_limit,
    bool? steward_limitation_allocation,
    bool? license,
    dynamic license_form,
    dynamic license_file,
    String? reviewer_role,
    String? reviewer_fullname,
    String? reviewer_mobile,
    String? checker_message,
    bool? final_accept,
    bool? temporary_registration,
    String? created_by,
    String? modified_by,
    dynamic user_bank_info,
    int? wallet,
    List<dynamic>? cars,
    List<dynamic>? user_level,
  }) = _GuildProfile;

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

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

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

@freezed
abstract class Address with _$Address {
  const factory Address({
    Province? province,
    City? city,
    String? address,
    String? postal_code,
  }) = _Address;

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

@freezed
abstract class Province with _$Province {
  const factory Province({
    String? key,
    String? name,
  }) = _Province;

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

@freezed
abstract class City with _$City {
  const factory City({
    String? key,
    String? name,
  }) = _City;

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

@freezed
abstract class GuildAreaActivity with _$GuildAreaActivity {
  const factory GuildAreaActivity({
    String? key,
    String? title,
  }) = _GuildAreaActivity;

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

@freezed
abstract class GuildTypeActivity with _$GuildTypeActivity {
  const factory GuildTypeActivity({
    String? key,
    String? title,
  }) = _GuildTypeActivity;

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

@freezed
abstract class GetPosStatus with _$GetPosStatus {
  const factory GetPosStatus({
    int? len_active_sessions,
    bool? has_pons,
    bool? has_active_pons,
  }) = _GetPosStatus;

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