Files
alliance-services/app/Models/Auth/UserAlt.php
2026-03-14 20:59:41 -05:00

41 lines
760 B
PHP

<?php
namespace App\Models\Auth;
use Illuminate\Database\Eloquent\Model;
class UserAlt extends Model
{
public $table = 'user_alts';
public $primaryKey = 'id';
public $timestamps = false;
/**
* The attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'name',
'main_id',
'character_id',
'avatar',
'access_token',
'inserted_at',
'expires_in',
'owner_hash',
];
public function mainCharacter() {
return $this->belongsTo('App\Models\Auth\User', 'character_id', 'main_id');
}
public function getMain() {
return User::where([
'character_id' => $this->main_id
])->get();
}
}