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

part 'location_requirements.g.dart';

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

  @JsonKey(name: 'Maßnahmentabelle Standortansprüche')
  List<IdValue>? measures;
  @JsonKey(name: 'Flächentyp')
  List<IdValueColor>? areaType;
  @JsonKey(name: 'Exposition')
  List<IdValueColor>? exposition;
  @JsonKey(name: 'Licht')
  List<IdValueColor>? light;
  @JsonKey(name: 'Feuchtigkeit')
  List<IdValueColor>? humidity;
  @JsonKey(name: 'Topographie')
  List<IdValueColor>? topography;
  @JsonKey(name: 'Geometrie')
  List<IdValueColor>? geometry;
  @JsonKey(name: 'Wertigkeit')
  IdValueColor? value;
  @JsonKey(name: 'Kosten')
  IdValueColor? costs;
  @JsonKey(name: 'Aufwand')
  IdValueColor? effort;
  @JsonKey(name: 'Pflegeaufwand')
  IdValueColor? careEffort;
  @JsonKey(name: 'Mindesflächengröße in m²')
  int? minimalAreaSize;
  @JsonKey(name: 'Boden')
  List<IdValueColor>? ground;

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

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