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

part 'business.g.dart';

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

  @JsonKey(name: 'field_2404114')
  @Index()
  String? name;

  @JsonKey(name: 'field_3021727')
  IdValueColor? businessType;

  @JsonKey(name: 'field_2404115')
  IdValueColor? businessOrigin;

  @JsonKey(name: 'field_2404155')
  List<IdValue>? referenceImplementation;

  @JsonKey(name: 'field_2404143')
  String? region;

  @JsonKey(name: 'field_2404117')
  String? businessContact;
  @JsonKey(name: 'field_2404119')
  String? businessEmail;
  @JsonKey(name: 'field_2404120')
  String? businessPhone;

  @JsonKey(name: 'field_2404121')
  String? contact1Name;
  @JsonKey(name: 'field_2404122')
  String? contact1Position;
  @JsonKey(name: 'field_2404123')
  String? contact1Email;
  @JsonKey(name: 'field_2404124')
  String? contact1Phone;

  @JsonKey(name: 'field_2404125')
  String? contact2Name;
  @JsonKey(name: 'field_2404126')
  String? contact2Position;
  @JsonKey(name: 'field_2404127')
  String? contact2Email;
  @JsonKey(name: 'field_2404128')
  String? contact2Phone;

  @JsonKey(name: 'field_2404129')
  String? contact3Name;
  @JsonKey(name: 'field_2404130')
  String? contact3Email;

  @JsonKey(name: 'field_2404131')
  String? addressComplete;
  @JsonKey(name: 'field_2404132')
  String? addressStreet;
  @JsonKey(name: 'field_2404133')
  String? addressPostalCode;
  @JsonKey(name: 'field_2404134')
  String? addressCity;
  @JsonKey(name: 'field_2404135')
  String? addressRegion;
  @JsonKey(name: 'field_2404136')
  String? addressFederalState;

  @JsonKey(name: 'field_2404138')
  String? businessBio;

  @JsonKey(name: 'field_2428872')
  List<IdValue>? experienceReport;

  @JsonKey(name: 'field_3137840')
  String? notice;

  @JsonKey(name: 'field_3136789')
  List<IdValue>? logins;

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

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