CaiWuXiTong/app/Models/Auth/UserInvitation.php
WuYongJie 9595267ee7
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

41 lines
790 B
PHP

<?php
namespace App\Models\Auth;
use App\Abstracts\Model;
class UserInvitation extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'user_invitations';
protected $tenantable = false;
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = ['user_id', 'token', 'created_from', 'created_by'];
public function user()
{
return $this->belongsTo(user_model_class());
}
/**
* Scope a query to only include given token value.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @return void
*/
public function scopeToken($query, $token)
{
$query->where('token', $token);
}
}