/// Model for today's water progress data
class UserProgressForTodayModel {
  num? quantityConsumed;
  num? percentageConsumed;
  num? percentageLeft;
  num? quantityLimit;

  UserProgressForTodayModel({
    this.quantityConsumed,
    this.percentageConsumed,
    this.percentageLeft,
    this.quantityLimit,
  });

  factory UserProgressForTodayModel.fromJson(Map<String, dynamic> json) => UserProgressForTodayModel(
        quantityConsumed: json['QuantityConsumed'],
        percentageConsumed: json['PercentageConsumed'],
        percentageLeft: json['PercentageLeft'],
        quantityLimit: json['QuantityLimit'],
      );

  Map<String, dynamic> toJson() {
    return {
      'QuantityConsumed': quantityConsumed,
      'PercentageConsumed': percentageConsumed,
      'PercentageLeft': percentageLeft,
      'QuantityLimit': quantityLimit,
    };
  }
}

/// Model for weekly water progress data
class UserProgressForWeekModel {
  int? dayNumber;
  String? dayDate;
  String? dayName;
  num? percentageConsumed;

  UserProgressForWeekModel({
    this.dayNumber,
    this.dayDate,
    this.dayName,
    this.percentageConsumed,
  });

  factory UserProgressForWeekModel.fromJson(Map<String, dynamic> json) => UserProgressForWeekModel(
        dayNumber: json['DayNumber'] as int?,
        dayDate: json['DayDate']?.toString(),
        dayName: json['DayName']?.toString(),
        percentageConsumed: json['PercentageConsumed'],
      );

  Map<String, dynamic> toJson() {
    return {
      'DayNumber': dayNumber,
      'DayDate': dayDate,
      'DayName': dayName,
      'PercentageConsumed': percentageConsumed,
    };
  }
}

/// Model for monthly water progress data
class UserProgressForMonthModel {
  int? monthNumber;
  String? monthName;
  num? percentageConsumed;

  UserProgressForMonthModel({
    this.monthNumber,
    this.monthName,
    this.percentageConsumed,
  });

  factory UserProgressForMonthModel.fromJson(Map<String, dynamic> json) => UserProgressForMonthModel(
        monthNumber: json['MonthNumber'] as int?,
        monthName: json['MonthName']?.toString(),
        percentageConsumed: json['PercentageConsumed'],
      );

  Map<String, dynamic> toJson() {
    return {
      'MonthNumber': monthNumber,
      'MonthName': monthName,
      'PercentageConsumed': percentageConsumed,
    };
  }
}

/// Model for user progress history data
class UserProgressHistoryModel {
  num? quantity;
  String? createdDate;

  UserProgressHistoryModel({
    this.quantity,
    this.createdDate,
  });

  factory UserProgressHistoryModel.fromJson(Map<String, dynamic> json) => UserProgressHistoryModel(
        quantity: json['Quantity'],
        createdDate: json['CreatedDate']?.toString(),
      );

  Map<String, dynamic> toJson() {
    return {
      'Quantity': quantity,
      'CreatedDate': createdDate,
    };
  }
}
