21 lines
551 B
Dart
21 lines
551 B
Dart
|
import 'package:ambito/src/entity/base_entity.dart';
|
||
|
import 'package:isar/isar.dart';
|
||
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'measure_category.g.dart';
|
||
|
|
||
|
@collection
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class MeasureCategory extends BaseEntity with EntityWithIdAndName {
|
||
|
MeasureCategory();
|
||
|
|
||
|
String? image;
|
||
|
String? description;
|
||
|
int children = 0;
|
||
|
|
||
|
factory MeasureCategory.fromJson(Map<String, dynamic> json) =>
|
||
|
_$MeasureCategoryFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$MeasureCategoryToJson(this);
|
||
|
}
|