import 'package:ambito/src/entity/entities.dart';
import 'package:isar/isar.dart';
import 'package:json_annotation/json_annotation.dart';

part 'organism.g.dart';

@JsonSerializable(explicitToJson: true)
@collection
class Organism extends BaseEntity with EntityWithIdAndName {
  Organism();

  String? kind;
  String? kindGroup;
  List<IdValue>? measures;
  List<IdValue>? measureTypes;
  List<IdValueColor>? stateOfDanger;
  List<IdValueColor>? regionalAdmissibility;

  factory Organism.fromJson(Map<String, dynamic> json) =>
      _$OrganismFromJson(json);

  Map<String, dynamic> toJson() => _$OrganismToJson(this);
}
