// segmentation_model.dart
import 'package:freezed_annotation/freezed_annotation.dart';

part 'segmentation_model.freezed.dart';
part 'segmentation_model.g.dart';

@freezed
abstract class SegmentationModel with _$SegmentationModel {
  const factory SegmentationModel({
    String? key,
    String? productKey,
    Buyer? buyer,
    DateTime? date,
    int? weight,
    String? result,
  }) = _SegmentationModel;

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

@freezed
abstract class Buyer with _$Buyer {
  const factory Buyer({String? fullname, String? mobile, String? shop, String? type}) = _Buyer;

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