1
0
mirror of https://github.com/krawieck/lemmur/ synced 2024-12-18 11:28:45 +01:00
lemmur-app-android/lib/client/models/category.dart

19 lines
482 B
Dart
Raw Normal View History

2020-08-10 16:07:00 +02:00
import 'package:json_annotation/json_annotation.dart';
part 'category.g.dart';
/// based on https://github.com/LemmyNet/lemmy/blob/464ea862b10fa7b226b2550268e40d8e685a939c/server/lemmy_db/src/category.rs#L10
@JsonSerializable(fieldRename: FieldRename.snake, createToJson: false)
class Category {
final int id;
final String name;
const Category({
this.id,
this.name,
});
factory Category.fromJson(Map<String, dynamic> json) =>
_$CategoryFromJson(json);
}