28 lines
648 B
PHP
28 lines
648 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class ArchiveInfoResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'num' => $this->archive_num,
|
|
'post_in' => $this->post_in,
|
|
'status' => $this->status,
|
|
'foxpro_num' => $this->foxpro_num,
|
|
'mis_num' => $this->mis_num,
|
|
'type' => $this->historyType()
|
|
];
|
|
}
|
|
}
|