import 'package:freezed_annotation/freezed_annotation.dart';

part 'allocated_made.freezed.dart';
part 'allocated_made.g.dart';

@freezed
abstract class AllocatedMadeModel with _$AllocatedMadeModel {
  factory AllocatedMadeModel({
    int? id,
    Product? product,
    dynamic killHouse,
    dynamic toKillHouse,
    Steward? steward,
    dynamic toSteward,
    dynamic guilds,
    Steward? toGuilds,
    dynamic toColdHouse,
    int? indexWeight,
    int? dateTimestamp,
    int? newState,
    int? newReceiverState,
    int? newAllocationState,
    String? key,
    String? createDate,
    String? modifyDate,
    bool? trash,
    int? numberOfCarcasses,
    int? realNumberOfCarcasses,
    int? receiverRealNumberOfCarcasses,
    int? weightOfCarcasses,
    int? realWeightOfCarcasses,
    int? receiverRealWeightOfCarcasses,
    int? weightLossOfCarcasses,
    bool? finalRegistration,
    String? sellType,
    String? productName,
    String? sellerType,
    String? type,
    String? saleType,
    String? allocationType,
    bool? systemRegistrationCode,
    int? registrationCode,
    int? amount,
    int? totalAmount,
    int? totalAmountPaid,
    int? totalAmountRemain,
    String? loggedRegistrationCode,
    String? state,
    String? receiverState,
    String? allocationState,
    String? date,
    String? role,
    String? stewardTempKey,
    bool? approvedPriceStatus,
    bool? calculateStatus,
    bool? temporaryTrash,
    bool? temporaryDeleted,
    String? createdBy,
    String? modifiedBy,
    dynamic wareHouse,
    dynamic stewardWareHouse,
    dynamic car,
    dynamic dispenser,
  }) = _AllocatedMadeModel;

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

@freezed
abstract class Product with _$Product {
  factory Product({
    int? weightAverage,
  }) = _Product;

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

@freezed
abstract class Steward with _$Steward {
  factory Steward({
    int? id,
    User? user,
    Address? address,
    Activity? guildAreaActivity,
    Activity? guildTypeActivity,
    List<dynamic>? killHouse,
    List<dynamic>? stewardKillHouse,
    List<dynamic>? stewards,
    PosStatus? getPosStatus,
    String? key,
    String? createDate,
    String? modifyDate,
    bool? trash,
    dynamic userIdForeignKey,
    dynamic addressIdForeignKey,
    dynamic userBankIdForeignKey,
    dynamic walletIdForeignKey,
    dynamic provincialGovernmentIdKey,
    dynamic identityDocuments,
    bool? active,
    int? cityNumber,
    String? cityName,
    String? guildsId,
    String? licenseNumber,
    String? guildsName,
    String? phone,
    String? typeActivity,
    String? areaActivity,
    int? provinceNumber,
    String? provinceName,
    bool? steward,
    bool? hasPos,
    dynamic centersAllocation,
    dynamic killHouseCentersAllocation,
    dynamic allocationLimit,
    bool? limitationAllocation,
    String? registerarRole,
    String? registerarFullname,
    String? registerarMobile,
    bool? killHouseRegister,
    bool? stewardRegister,
    bool? guildsRoomRegister,
    bool? posCompanyRegister,
    String? provinceAcceptState,
    String? provinceMessage,
    String? condition,
    String? descriptionCondition,
    bool? stewardActive,
    dynamic stewardAllocationLimit,
    bool? stewardLimitationAllocation,
    bool? license,
    dynamic licenseForm,
    dynamic licenseFile,
    String? reviewerRole,
    String? reviewerFullname,
    String? reviewerMobile,
    String? checkerMessage,
    bool? finalAccept,
    bool? temporaryRegistration,
    String? createdBy,
    String? modifiedBy,
    dynamic userBankInfo,
    int? wallet,
    List<dynamic>? cars,
    List<dynamic>? userLevel,
  }) = _Steward;

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

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

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

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

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

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

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

@freezed
abstract class Activity with _$Activity {
  factory Activity({
    String? key,
    String? title,
  }) = _Activity;

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

@freezed
abstract class PosStatus with _$PosStatus {
  factory PosStatus({
    int? lenActiveSessions,
    bool? hasPons,
    bool? hasActivePons,
  }) = _PosStatus;

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