Files
qztool/backend/app/Models/ServiceTicket.php
T

29 lines
586 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ServiceTicket extends Model
{
protected $fillable = [
'user_id', 'tool_id', 'contact', 'requirement', 'quote_cents', 'status', 'delivery_note',
];
protected function casts(): array
{
return ['quote_cents' => 'integer'];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function tool(): BelongsTo
{
return $this->belongsTo(Tool::class);
}
}