import '../../domain/entities/market_overview.dart';

class MarketOverviewModel extends MarketOverview {
  const MarketOverviewModel({
    required super.price,
    required super.greenPoints,
    required super.blackHoleAmount,
    required super.circulationPool,
    required super.totalMined,
    required super.totalSellBurned,
    required super.effectiveDenominator,
    required super.burnMultiplier,
    required super.totalShares,
    required super.burnTarget,
    required super.burnProgress,
  });

  factory MarketOverviewModel.fromJson(Map<String, dynamic> json) {
    return MarketOverviewModel(
      price: json['price']?.toString() ?? '0',
      greenPoints: json['greenPoints']?.toString() ?? '0',
      blackHoleAmount: json['blackHoleAmount']?.toString() ?? '0',
      circulationPool: json['circulationPool']?.toString() ?? '0',
      totalMined: json['totalMined']?.toString() ?? '0',
      totalSellBurned: json['totalSellBurned']?.toString() ?? '0',
      effectiveDenominator: json['effectiveDenominator']?.toString() ?? '0',
      burnMultiplier: json['burnMultiplier']?.toString() ?? '0',
      totalShares: json['totalShares']?.toString() ?? '0',
      burnTarget: json['burnTarget']?.toString() ?? '0',
      burnProgress: json['burnProgress']?.toString() ?? '0',
    );
  }
}
