import 'package:freezed_annotation/freezed_annotation.dart'; part 'post_categories.g.dart'; @JsonSerializable() class Tag { int id; String alias; String name; String description; DateTime createdAt; DateTime updatedAt; DateTime? deletedAt; Tag({ required this.id, required this.alias, required this.name, required this.description, required this.createdAt, required this.updatedAt, required this.deletedAt, }); factory Tag.fromJson(Map json) => _$TagFromJson(json); Map toJson() => _$TagToJson(this); } @JsonSerializable() class Category { int id; String alias; String name; String description; DateTime createdAt; DateTime updatedAt; DateTime? deletedAt; Category({ required this.id, required this.alias, required this.name, required this.description, required this.createdAt, required this.updatedAt, required this.deletedAt, }); factory Category.fromJson(Map json) => _$CategoryFromJson(json); Map toJson() => _$CategoryToJson(this); }