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.
27 lines
649 B
27 lines
649 B
2 years ago
|
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];
|
||
|
}
|