import 'package:json_annotation/json_annotation.dart';
import 'dart:convert';

part 'good_response_entity.g.dart';

@JsonSerializable()
class GoodResponseEntity {

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

  GoodResponseEntity();
  int? id;
  @JsonKey(name: 'eacc_good_category_id')
  int? categoryId;
  String name = '';
  String? ean13;
  int? articul;
  double? price;
  @JsonKey(name: 'opt_price')
  double? optPrice;
  @JsonKey(name: 'base_price')
  double? basePrice;
  @JsonKey(name: 'auto_base_price')
  double? autoBasePrice;
  int? divisible;
  String? description;
  @JsonKey(name: 'category_name')
  String? categoryName;

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

  @override
  String toString() {
    return jsonEncode(this);
  }

}
