summaryrefslogtreecommitdiff
path: root/player-android/lib/models/tag.dart
blob: ed0340665913ad31b77952524da19f221460ac83 (plain)
1
2
3
4
5
6
7
8
9
10
11
class Tag {
  final int id;
  final String name;

  const Tag({required this.id, required this.name});

  factory Tag.fromJson(Map<String, dynamic> json) =>
      Tag(id: json['id'] as int? ?? 0, name: json['name'] as String? ?? '');

  Map<String, dynamic> toJson() => {'id': id, 'name': name};
}