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

part 'measure_types_details.g.dart';

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

  @JsonKey(name: 'field_3050769')
  @Index()
  String? name;
  @JsonKey(name: 'field_2402082')
  @Index()
  String? measureType;
  @JsonKey(name: 'field_2402202')
  List<IdValue>? measureTypeLink;
  @JsonKey(name: 'field_2402083')
  List<IdValueColor>? areaType;
  @JsonKey(name: 'field_2402084')
  List<IdValueColor>? exposition;
  @JsonKey(name: 'field_2402085')
  List<IdValueColor>? light;
  @JsonKey(name: 'field_2402086')
  List<IdValueColor>? moisture;
  @JsonKey(name: 'field_2402087')
  List<IdValueColor>? topology;
  @JsonKey(name: 'field_2402088')
  List<IdValueColor>? geometry;
  @JsonKey(name: 'field_2402089')
  IdValueColor? value;
  @JsonKey(name: 'field_2402090')
  IdValueColor? costs;
  @JsonKey(name: 'field_2402091')
  IdValueColor? effort;
  @JsonKey(name: 'field_2402092')
  IdValueColor? maintenanceEffort;
  @JsonKey(name: 'field_2402093')
  String? minSize;
  @JsonKey(name: 'field_2402096')
  List<IdValueColor>? soil;

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

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