Files
kooltab/lib/models/tab_item_purchase.dart
T

28 lines
667 B
Dart

class TabItemPurchase {
final String id;
final String tabItemId;
final DateTime purchasedAt;
final DateTime? removedAt;
const TabItemPurchase({
required this.id,
required this.tabItemId,
required this.purchasedAt,
this.removedAt,
});
bool get isRemoved => removedAt != null;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is TabItemPurchase &&
id == other.id &&
tabItemId == other.tabItemId &&
purchasedAt == other.purchasedAt &&
removedAt == other.removedAt;
@override
int get hashCode => Object.hash(id, tabItemId, purchasedAt, removedAt);
}