Files
qztool/backend/app/Models/UserToolOpen.php
T
DevandCursor 60daff2365 搭建轻舟一期门户、后台和统一登录。
让分类、会员和示例工具共用同一账号,本地即可跑通登录与授权。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 16:46:35 +08:00

25 lines
503 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserToolOpen extends Model
{
protected $fillable = ['user_id', 'tool_id', 'open_count', 'last_opened_at'];
protected function casts(): array
{
return [
'open_count' => 'integer',
'last_opened_at' => 'datetime',
];
}
public function tool(): BelongsTo
{
return $this->belongsTo(Tool::class);
}
}