Files
compras/app/Models/RequisitionItem.php
T
nala c6373365bf
tests / ci (push) Canceled after 0s
commit9
2026-10-30 20:02:30 +02:00

31 lines
751 B
PHP

<?php
namespace App\Models;
use App\Models\Concerns\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
/**
* Decimal casts expose exact decimal strings for monetary calculations.
*
* @property string $quantity
* @property string $tax_rate
* @property int|null $equipment_id
* @property int|null $spare_part_id
* @property int|null $catalogue_entry_id
* @property array<string,mixed>|null $catalogue_snapshot
*/
class RequisitionItem extends Model
{
use BelongsToTenant;
public $timestamps = false;
protected $guarded = ['id'];
protected function casts(): array
{
return ['quantity' => 'decimal:3', 'tax_rate' => 'decimal:2', 'catalogue_entry_id' => 'integer', 'catalogue_snapshot' => 'array'];
}
}