Files
compras/app/Models/PurchaseAward.php
T
nala 4d42f083ce
tests / ci (push) Canceled after 0s
commit
2026-10-28 12:06:05 +02:00

37 lines
942 B
PHP

<?php
namespace App\Models;
use App\Models\Concerns\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
* @property int $tenant_id
* @property int $requisition_id
* @property int $quotation_id
* @property int $created_by
* @property string $status
* @property string $comparison_hash
* @property array<string, mixed> $approval_snapshot
* @property list<array<string, mixed>> $decision_matrix
*/
class PurchaseAward extends Model
{
use BelongsToTenant;
protected $guarded = ['id'];
protected function casts(): array
{
return ['approval_snapshot' => 'array', 'decision_matrix' => 'array', 'delivery_date' => 'date:Y-m-d'];
}
/** @return HasMany<PurchaseAwardApproval, $this> */
public function approvals(): HasMany
{
return $this->hasMany(PurchaseAwardApproval::class)->orderBy('position');
}
}