import 'package:hive/hive.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';

import 'content_list_model.dart';
part 'ContentHive.g.dart';


@JsonSerializable()
@HiveType(typeId:2)
class ContentHive extends Equatable{
  @HiveField(0)
  final int id;
  @HiveField(1)
  final String content;
  @HiveField(2)
  final List<ContentListModel> list;
  factory ContentHive.fromJson(Map<String, dynamic> json) =>_$ContentHiveFromJson(json);

  const ContentHive({
    required this.id,
    required this.content,
    required this.list,
  });
  @override
  List<Object?> get props => [id,content,list];
}