import 'package:ambito/src/entity/_general/id_value/id_value.dart';
import 'package:ambito/src/entity/base_entity.dart';
import 'package:isar/isar.dart';
import 'package:json_annotation/json_annotation.dart';

part 'cart_element.g.dart';

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

  @JsonKey(name: 'field_3110710')
  String? name;
  @JsonKey(name: 'field_3110713')
  List<IdValue>? cart;
  @JsonKey(name: 'field_3110714')
  String? amount;
  @JsonKey(name: 'field_3110715')
  List<IdValue>? provider;
  @JsonKey(name: 'field_3110716')
  String? priceType;
  @JsonKey(name: 'field_3110717')
  String? price;

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

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