import 'package:freezed_annotation/freezed_annotation.dart';

part 'out_province_carcasses_buyer.freezed.dart';
part 'out_province_carcasses_buyer.g.dart';

@freezed
abstract class OutProvinceCarcassesBuyer with _$OutProvinceCarcassesBuyer {
  const factory OutProvinceCarcassesBuyer({
    Buyer? buyer,
    RequestsInfo? requestsInfo,
    String? key,
    bool? trash,
    String? fullname,
    String? firstName,
    String? lastName,
    String? mobile,
    String? unitName,
    String? city,
    String? province,
    String? role,
    bool? active,
    String? typeActivity,
    dynamic killHouse,
    int? steward,
  }) = _OutProvinceCarcassesBuyer;

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

@freezed
abstract class Buyer with _$Buyer {
  const factory Buyer({
    String? key,
    bool? trash,
    String? fullname,
    String? firstName,
    String? lastName,
    String? mobile,
    String? unitName,
    String? city,
    String? province,
    bool? active,
    int? user,
  }) = _Buyer;

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

@freezed
abstract class RequestsInfo with _$RequestsInfo {
  const factory RequestsInfo({
    int? numberOfRequests,
    int? totalQuantity,
    double? totalWeight,
  }) = _RequestsInfo;

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