Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
TasksProgressResource
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 toArray
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Domain\Shared\Resources;
4
5use App\Models\User;
6use Domain\PickingOrder\Enums\PickingOrderTypeEnum;
7use Domain\ShippingPackaging\Resources\ShippingPackagingPickingOrderResource;
8use Domain\StockIO\Resources\StockOIResource;
9use Domain\User\Resources\UserResource;
10use Illuminate\Http\Request;
11use Illuminate\Http\Resources\Json\JsonResource;
12use Illuminate\Support\Carbon;
13use Illuminate\Support\Facades\Auth;
14
15/**
16 * @property int $id
17 * @property string $typeReturn
18 * @property float $totalamount
19 * @property float $totalweight
20 * @property int $user_id
21 * @property string $name
22 */
23class TasksProgressResource extends JsonResource
24{
25    public function toArray(Request $request): array
26    {
27        return [
28            'id' => $this->id,
29            'type' => $this->typereturn,
30            'total_amount' => $this->totalamount,
31            'total_weight' => $this->totalweight,
32            'user_id' => $this?->user_id,
33            'user_name' => $this?->name
34        ];
35    }
36}