content: import 'package:crafty_bay/data/models/reviewer_profile.dart';
  
  class ReviewData {
    int? id;
    String? description;
    String? rating;
    int? customerId;
    int? productId;
    String? createdAt;
    String? updatedAt;
    ReviewerProfile? profile;
  
    ReviewData(
        {this.id,
        this.description,
        this.rating,
        this.customerId,
        this.productId,
        this.createdAt,
        this.updatedAt,
        this.profile});
  
    ReviewData.fromJson(Map<String, dynamic> json) {
      id = json['id'];
      description = json['description'];
      rating = json['rating'];
      customerId = json['customer_id'];
      productId = json['product_id'];
      createdAt = json['created_at'];
      updatedAt = json['updated_at'];
      profile = json['profile'] != null
          ? ReviewerProfile.fromJson(json['profile'])
          : null;
    }
  
    Map<String, dynamic> toJson() {
      final Map<String, dynamic> data = <String, dynamic>{};
      data['id'] = id;
      data['description'] = description;
      data['rating'] = rating;
      data['customer_id'] = customerId;
      data['product_id'] = productId;
      data['created_at'] = createdAt;
      data['updated_at'] = updatedAt;
      if (profile != null) {
        data['profile'] = profile!.toJson();
      }
      return data;
    }
  }
  