mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 21:35:32 +00:00
23 lines
481 B
Dart
23 lines
481 B
Dart
import 'package:isar/isar.dart';
|
|
part 'category.g.dart';
|
|
|
|
@collection
|
|
@Name("Category")
|
|
class Category {
|
|
Id? id;
|
|
String? name;
|
|
bool? forManga;
|
|
Category(
|
|
{this.id = Isar.autoIncrement,
|
|
required this.name,
|
|
required this.forManga});
|
|
|
|
Category.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
forManga = json['forManga'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() =>
|
|
{'id': id, 'name': name, 'forManga': forManga};
|
|
}
|