让分类、会员和示例工具共用同一账号,本地即可跑通登录与授权。 Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
586 B
PHP
29 lines
586 B
PHP
<?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);
|
|
}
|
|
}
|