import 'package:ambito/src/domain/entity/id_value/id_value.dart';
import 'package:ambito/src/domain/entity/id_value_color/id_value_color.dart';
import 'package:isar/isar.dart';
import 'package:json_annotation/json_annotation.dart';

import '../base_entity.dart';

part 'baumarten.g.dart';

@JsonSerializable(explicitToJson: true)
@collection
class Baumarten extends BaseEntity with EntityWithId {
  Baumarten();

  @JsonKey(name: 'order')
  String? orderString;
  @JsonKey(name: 'Art')
  String? art;
  @JsonKey(name: 'id 2')
  String? id2;
  @JsonKey(name: 'dt. Name')
  String? name;
  @JsonKey(name: 'Höhemin')
  String? minSize;
  @JsonKey(name: 'Höhemax')
  String? maxSize;
  @JsonKey(name: 'Lebensform')
  List<IdValueColor>? lebensform;
  @JsonKey(name: 'Wuchs/Krone')
  List<IdValueColor>? growth;
  @JsonKey(name: 'KLIMA')
  List<IdValueColor>? climate;
  @JsonKey(name: 'Risiko Kirschessigfliege')
  IdValueColor? riskCherryVinegarFly;
  @JsonKey(name: 'Wärmeliebend/mild')
  IdValueColor? thermophilic;
  @JsonKey(name: 'Frosthart')
  IdValueColor? frost;
  @JsonKey(name: 'Spätfrost')
  IdValueColor? latefrost;
  @JsonKey(name: 'Dürre')
  IdValueColor? drought;
  @JsonKey(name: 'Bodenwasser')
  String? waterlevel;
  @JsonKey(name: 'Bodenfeuchte')
  List<IdValueColor>? humidity;
  @JsonKey(name: 'Lichtzahl')
  String? valueLight;
  @JsonKey(name: 'Temperaturzahl')
  String? valueTemperature;
  @JsonKey(name: 'Feuchtezahl')
  String? valueHumidity;
  @JsonKey(name: 'Reaktionszahl')
  String? valueReaction;
  @JsonKey(name: 'Stickstoffzahl')
  String? valueNitrogen;
  @JsonKey(name: 'Region')
  List<IdValueColor>? region;
  @JsonKey(name: 'Anmerkung')
  String? note;
  @JsonKey(name: "Wild/Kulturart")
  String? typeOfCulture;
  @JsonKey(name: 'Gebiet 1')
  String? region1;
  @JsonKey(name: 'Gebiet 2')
  String? region2;
  @JsonKey(name: 'Gebiet 3')
  String? region3;
  @JsonKey(name: 'Gebiet 4')
  String? region4;
  @JsonKey(name: 'Gebiet 5')
  String? region5;
  @JsonKey(name: 'Gebiet 6')
  String? region6;
  @JsonKey(name: '00 Maßnahmen_Main')
  List<IdValue>? actions;
  @JsonKey(name: 'Heimisch')
  bool? local;

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

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