You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
650 B
28 lines
650 B
import 'package:equatable/equatable.dart';
|
|
import 'package:hive/hive.dart';
|
|
import 'package:json_annotation/json_annotation.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];
|
|
} |