
import 'dart:convert';

class ProductOption {
  int? id;
  String? name;
  double? adjustAmount;
  String? extra;
  bool? disabled;

  ProductOption.fromJson(Map<String, dynamic> json)
    : id = json['id'],
      name = json['name'],
      adjustAmount = double.parse(json['adjust_amount'].toString()),
      extra = json['extra'],
      disabled = json['disabled'];

  Map<String, dynamic> toJson() => {
    'id': id,
    'name': name,
    'adjust_amount': adjustAmount,
    'extra': extra,
    'disabled': disabled
  };

  @override
  String toString() {
    return json.encode(this);
  }
}