🧱 New categories, tags subscription type
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/models/post_tag.dart';
|
||||
import 'package:island/utils/text.dart';
|
||||
|
||||
part 'post_category.freezed.dart';
|
||||
@@ -29,3 +30,21 @@ sealed class SnPostCategory with _$SnPostCategory {
|
||||
return name ?? slug;
|
||||
}
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnCategorySubscription with _$SnCategorySubscription {
|
||||
const factory SnCategorySubscription({
|
||||
required String id,
|
||||
required String accountId,
|
||||
required String? categoryId,
|
||||
required SnPostCategory? category,
|
||||
required String? tagId,
|
||||
required SnPostTag? tag,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
}) = _SnCategorySubscription;
|
||||
|
||||
factory SnCategorySubscription.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnCategorySubscriptionFromJson(json);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user