<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ConversationResource extends JsonResource
{
	/**
	 * Transform the resource into an array.
	 *
	 * @param \Illuminate\Http\Request $request
	 * @return array
	 */
	public function toArray($request)
	{
		//return parent::toArray($request);
		return [
			'id'                    => $this->id,
			'user_id'               => $this->user_id,
			'title'                 => $this->title,
			'has_new'               => $this->has_new,
			'has_new_message_badge' => $this->has_new_message_badge,
			'is_active'             => $this->is_active,
			'last_message_at'       => $this->last_message_at,
			'created_at'            => $this->created_at,
		];
	}
}