/// totalRecord : 0
/// isSuccess : true
/// errorMesssage : "string"
/// Data : [{"ReviewId":"string","ItemId":0,"CustomerId":0,"FullName":"string","Email":"string","Publish":true,"ReviewDate":"2021-09-15T07:23:53.972Z","ReviewPoint":0,"Comment":"string","ItemName":"string","ReviewHtml":"string"}]
/// message : "string"

class ReviewResponse {
  int? _totalRecord;
  bool? _isSuccess;
  String? _errorMesssage;
  List<ReviewData>? _data;
  String? _message;

  int? get totalRecord => _totalRecord;

  bool? get isSuccess => _isSuccess;

  String? get errorMesssage => _errorMesssage;

  List<ReviewData>? get data => _data;

  String? get message => _message;

  ReviewResponse({int? totalRecord, bool? isSuccess, String? errorMesssage, List<ReviewData>? data, String? message}) {
    _totalRecord = totalRecord;
    _isSuccess = isSuccess;
    _errorMesssage = errorMesssage;
    _data = data;
    _message = message;
  }

  ReviewResponse.fromJson(dynamic json) {
    _totalRecord = json['totalRecord'];
    _isSuccess = json['isSuccess'];
    _errorMesssage = json['errorMesssage'];
    if (json['Data'] != null) {
      _data = [];
      json['Data'].forEach((v) {
        _data?.add(ReviewData.fromJson(v));
      });
    }
    _message = json['message'];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map['totalRecord'] = _totalRecord;
    map['isSuccess'] = _isSuccess;
    map['errorMesssage'] = _errorMesssage;
    if (_data != null) {
      map['Data'] = _data?.map((v) => v.toJson()).toList();
    }
    map['message'] = _message;
    return map;
  }
}

/// ReviewId : "string"
/// ItemId : 0
/// CustomerId : 0
/// FullName : "string"
/// Email : "string"
/// Publish : true
/// ReviewDate : "2021-09-15T07:23:53.972Z"
/// ReviewPoint : 0
/// Rate : 3
/// Comment : "string"
/// ItemName : "string"
/// ReviewHtml : "string"

class ReviewData {
  String? _reviewId;
  int? _itemId;
  int? _customerId;
  String? _avatar;
  String? _fullName;
  String? _email;
  bool? _publish;
  String? _reviewDate;
  int? _reviewPoint;
  int? _rate;
  String? _comment;
  String? _itemName;
  String? _reviewHtml;

  String? get reviewId => _reviewId;

  int? get itemId => _itemId;

  int? get customerId => _customerId;

  String? get avatar => _avatar;

  String? get fullName => _fullName;

  String? get email => _email;

  bool? get publish => _publish;

  String? get reviewDate => _reviewDate;

  int? get reviewPoint => _reviewPoint;

  int? get rate => _rate;

  String? get comment => _comment;

  String? get itemName => _itemName;

  String? get reviewHtml => _reviewHtml;

  ReviewData(
      {String? reviewId,
      int? itemId,
      int? customerId,
      String? Avatar,
      String? fullName,
      String? email,
      bool? publish,
      String? reviewDate,
      int? reviewPoint,
      int? rate,
      String? comment,
      String? itemName,
      String? reviewHtml}) {
    _reviewId = reviewId;
    _itemId = itemId;
    _customerId = customerId;
    _avatar=avatar;
    _fullName = fullName;
    _email = email;
    _publish = publish;
    _reviewDate = reviewDate;
    _reviewPoint = reviewPoint;
    _rate = rate;
    _comment = comment;
    _itemName = itemName;
    _reviewHtml = reviewHtml;
  }

  ReviewData.fromJson(dynamic json) {
    _reviewId = json['ReviewId'];
    _itemId = json['ItemId'];
    _customerId = json['CustomerId'];
    _avatar = json['Avatar'];
    _fullName = json['FullName'];
    _email = json['Email'];
    _publish = json['Publish'];
    _reviewDate = json['ReviewDate'];
    _reviewPoint = json['ReviewPoint'];
    _rate = json['Rate'];
    _comment = json['Comment'];
    _itemName = json['ItemName'];
    _reviewHtml = json['ReviewHtml'];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map['ReviewId'] = _reviewId;
    map['ItemId'] = _itemId;
    map['CustomerId'] = _customerId;
    map['Avatar'] = _avatar;
    map['FullName'] = _fullName;
    map['Email'] = _email;
    map['Publish'] = _publish;
    map['ReviewDate'] = _reviewDate;
    map['ReviewPoint'] = _reviewPoint;
    map['Rate'] = _rate;
    map['Comment'] = _comment;
    map['ItemName'] = _itemName;
    map['ReviewHtml'] = _reviewHtml;
    return map;
  }
}
