<?php
declare(strict_types=1);

// THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.

namespace Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output;

use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Scalars\DateTime as DateTimeType;
use Automattic\WooCommerce\Internal\Api\Schema\ObjectType;
use Automattic\WooCommerce\Internal\Api\Schema\Type;

class ProductReview {
	private static ?ObjectType $instance = null;

	public static function get(): ObjectType {
		if ( null === self::$instance ) {
			self::$instance = new ObjectType(
				array(
					'name'        => 'ProductReview',
					'description' => __( 'Represents a customer review for a product.', 'woocommerce' ),
					'fields'      => fn() => array(
						'id'           => array(
							'type'        => Type::nonNull( Type::int() ),
							'description' => __( 'The review ID.', 'woocommerce' ),
						),
						'product_id'   => array(
							'type'        => Type::nonNull( Type::int() ),
							'description' => __( 'The product ID this review belongs to.', 'woocommerce' ),
						),
						'reviewer'     => array(
							'type'        => Type::nonNull( Type::string() ),
							'description' => __( 'The reviewer name.', 'woocommerce' ),
						),
						'review'       => array(
							'type'        => Type::nonNull( Type::string() ),
							'description' => __( 'The review content.', 'woocommerce' ),
						),
						'rating'       => array(
							'type'        => Type::nonNull( Type::int() ),
							'description' => __( 'The review rating (1-5).', 'woocommerce' ),
						),
						'date_created' => array(
							'type'        => DateTimeType::get(),
							'description' => __( 'The date the review was created.', 'woocommerce' ),
						),
					),
				)
			);
		}
		return self::$instance;
	}
}
