part of '../product.dart';

@freezed
class ProductVariant with _$ProductVariant {
  const factory ProductVariant({
    required String id,
    required String productId,
    required String name,
    required int priceModifier,
    required int cost,
    required Map<String, dynamic> metadata,
    required DateTime createdAt,
    required DateTime updatedAt,
  }) = _ProductVariant;

  factory ProductVariant.empty() => ProductVariant(
    id: '',
    productId: '',
    name: '',
    priceModifier: 0,
    cost: 0,
    metadata: {},
    createdAt: DateTime.now(),
    updatedAt: DateTime.now(),
  );
}
