import 'package:json_annotation/json_annotation.dart';

part 'preview_order_payment_point_data_model.g.dart';
@JsonSerializable()
class PreviewOrderPaymentPointDataModel {
  final int? status;
  final int? point;
  @JsonKey(name: 'text_display')
  final String? textDisplay;

  PreviewOrderPaymentPointDataModel({
    this.status,
    this.point,
    this.textDisplay,
  });

  bool get isEnableUsePoint => status == 1;

  factory PreviewOrderPaymentPointDataModel.fromJson(Map<String, dynamic> json) =>
      _$PreviewOrderPaymentPointDataModelFromJson(json);
  Map<String, dynamic> toJson() => _$PreviewOrderPaymentPointDataModelToJson(this);
}