You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.7 KiB
44 lines
1.7 KiB
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class CarInfo extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'car_no' => $this->car_no,
|
|
'frame_no' => $this->frame_no,
|
|
'engine_no' => $this->engine_no,
|
|
'factory_model' => $this->factory_model,
|
|
'car_used_type' => $this->car_used_type,
|
|
'car_man' => $this->car_man,
|
|
'purchase_price' => $this->purchase_price,
|
|
'register_date' => $this->register_date,
|
|
'seat_count' => $this->seat_count,
|
|
'insurance_times' => $this->insurance_times,
|
|
'insurance_serial_times' => $this->insurance_serial_times,
|
|
'repair_times' => $this->repair_times,
|
|
'insurance_repair_times' => $this->insurance_repair_times,
|
|
'last_insurance_company' => $this->last_insurance_company,
|
|
'last_insurance_type' => $this->last_insurance_type,
|
|
'last_insurance_rate' => $this->last_insurance_rate,
|
|
'last_insurance_salesman' => $this->last_insurance_salesman,
|
|
'last_insurance_date' => $this->last_insurance_date,
|
|
'force_expire_date' => $this->force_expire_date,
|
|
'business_expire_date' => $this->business_expire_date,
|
|
'status' => $this->status,
|
|
'created_at' => $this->created_at->toDateTimeString(),
|
|
'updated_at' => $this->updated_at->toDateTimeString(),
|
|
];
|
|
}
|
|
}
|
|
|