Post browse by categories, tags

This commit is contained in:
2025-08-21 23:21:30 +08:00
parent 3d473e2fec
commit f98e5a0aec
16 changed files with 366 additions and 58 deletions

View File

@@ -16,6 +16,7 @@ _SnPostCategory _$SnPostCategoryFromJson(Map<String, dynamic> json) =>
?.map((e) => SnPost.fromJson(e as Map<String, dynamic>))
.toList() ??
const [],
usage: (json['usage'] as num?)?.toInt() ?? 0,
);
Map<String, dynamic> _$SnPostCategoryToJson(_SnPostCategory instance) =>
@@ -24,4 +25,5 @@ Map<String, dynamic> _$SnPostCategoryToJson(_SnPostCategory instance) =>
'slug': instance.slug,
'name': instance.name,
'posts': instance.posts.map((e) => e.toJson()).toList(),
'usage': instance.usage,
};