part of '../order.dart';

@freezed
class Payment with _$Payment {
  const factory Payment({
    required String id,
    required String orderId,
    required String paymentMethodId,
    required String paymentMethodName,
    required String paymentMethodType,
    required int amount,
    required String status,
    required int splitNumber,
    required int splitTotal,
    required String splitDescription,
    required int refundAmount,
    required Map<String, dynamic> metadata,
    required DateTime createdAt,
    required DateTime updatedAt,
  }) = _Payment;

  factory Payment.empty() => Payment(
    id: '',
    orderId: '',
    paymentMethodId: '',
    paymentMethodName: '',
    paymentMethodType: '',
    amount: 0,
    status: '',
    splitNumber: 0,
    splitTotal: 0,
    splitDescription: '',
    refundAmount: 0,
    metadata: const {},
    createdAt: DateTime(1970),
    updatedAt: DateTime(1970),
  );
}
