import 'package:freezed_annotation/freezed_annotation.dart';

part 'steward_free_sale_bar.freezed.dart';
part 'steward_free_sale_bar.g.dart';

@freezed
abstract class StewardFreeSaleBar with _$StewardFreeSaleBar {
  const factory StewardFreeSaleBar({
    int? id,
    Buyer? buyer,
    String? key,
    String? createDate,
    String? modifyDate,
    bool? trash,
    String? buyerName,
    String? buyerMobile,
    String? province,
    String? city,
    String? driverName,
    String? driverMobile,
    String? typeCar,
    String? pelak,
    String? clearanceCode,
    int? numberOfCarcasses,
    double? weightOfCarcasses,
    String? date,
    bool? temporaryTrash,
    bool? temporaryDeleted,
    String? createdBy,
    String? modifiedBy,
    dynamic steward,
    dynamic guild,
    dynamic product,
  }) = _StewardFreeSaleBar;

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

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

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

@freezed
abstract class BuyerSteward with _$BuyerSteward {
  const factory BuyerSteward({
    String? key,
    String? guildsName,
    BuyerStewardUser? user,
    String? typeActivity,
    String? areaActivity,
  }) = _BuyerSteward;

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

@freezed
abstract class BuyerStewardUser with _$BuyerStewardUser {
  const factory BuyerStewardUser({
    String? fullname,
    String? firstName,
    String? lastName,
    String? mobile,
    String? nationalId,
    String? provinceName,
    String? cityName,
    String? password,
  }) = _BuyerStewardUser;

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