copy user entity and auth from ysv
This commit is contained in:
parent
9d5bfc33a6
commit
613180d459
24 changed files with 612 additions and 0 deletions
44
backend/app/Auth/SessionModel.php
Normal file
44
backend/app/Auth/SessionModel.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace App\Auth;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @property string $token
|
||||
* @property int $user_id
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $expires_at
|
||||
*
|
||||
* @method static Builder<static>|SessionModel newModelQuery()
|
||||
* @method static Builder<static>|SessionModel newQuery()
|
||||
* @method static Builder<static>|SessionModel query()
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SessionModel extends Model
|
||||
{
|
||||
protected $table = 'sessions';
|
||||
|
||||
protected $primaryKey = 'token';
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'token',
|
||||
'user_id',
|
||||
'created_at',
|
||||
'expires_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'created_at' => 'datetime',
|
||||
'expires_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue