class WaterCupModel {
  final String id;
  final String name;
  final int capacityMl;
  final String iconPath; // or use IconData if you prefer
  final bool isDefault;

  WaterCupModel({
    required this.id,
    required this.name,
    required this.capacityMl,
    required this.iconPath,
    this.isDefault = false,
  });

  WaterCupModel copyWith({
    String? id,
    String? name,
    int? capacityMl,
    String? iconPath,
    bool? isDefault,
  }) {
    return WaterCupModel(
      id: id ?? this.id,
      name: name ?? this.name,
      capacityMl: capacityMl ?? this.capacityMl,
      iconPath: iconPath ?? this.iconPath,
      isDefault: isDefault ?? this.isDefault,
    );
  }

  Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'capacityMl': capacityMl,
        'iconPath': iconPath,
        'isDefault': isDefault,
      };

  factory WaterCupModel.fromJson(Map<String, dynamic> json) => WaterCupModel(
        id: json['id'],
        name: json['name'],
        capacityMl: json['capacityMl'],
        iconPath: json['iconPath'],
        isDefault: json['isDefault'] ?? false,
      );
}
