import 'package:hive/hive.dart';

part 'display_data.g.dart';

@HiveType(typeId: 11)
class DisplayData extends HiveObject {
  @HiveField(0)
  final String name;

  @HiveField(1)
  final String brewery;

  @HiveField(2)
  final String prefecture;

  @HiveField(3)
  final String? catchCopy;

  @HiveField(4)
  final List<String> imagePaths;

  @HiveField(5)
  final double? rating;

  DisplayData({
    required this.name,
    required this.brewery,
    required this.prefecture,
    this.catchCopy,
    required this.imagePaths,
    this.rating,
  });

  DisplayData copyWith({
    String? name,
    String? brewery,
    String? prefecture,
    String? catchCopy,
    List<String>? imagePaths,
    double? rating,
  }) {
    return DisplayData(
      name: name ?? this.name,
      brewery: brewery ?? this.brewery,
      prefecture: prefecture ?? this.prefecture,
      catchCopy: catchCopy ?? this.catchCopy,
      imagePaths: imagePaths ?? this.imagePaths,
      rating: rating ?? this.rating,
    );
  }
}
