class SalesStatsEntity {
  final int orderL;
  final int reservL;
  final double amount;
  final double avgDiffMinutes;

  SalesStatsEntity({
    required this.orderL,
    required this.reservL,
    required this.amount,
    required this.avgDiffMinutes,
  });

  factory SalesStatsEntity.fromJson(Map<String, dynamic> json) {
    return SalesStatsEntity(
      orderL: json['orderL'] as int? ?? 0,
      reservL: json['reservL'] as int? ?? 0,
      amount: (json['amount'] as num? ?? 0).toDouble(),
      avgDiffMinutes: (json['avgDiffMinutes'] as num? ?? 0).toDouble(),
    );
  }
}