2021-03-30 00:27:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class ApiKey extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
|
|
'status',
|
|
|
|
'discriminator',
|
|
|
|
'last_used',
|
|
|
|
'secret',
|
|
|
|
'owner_user_id'
|
|
|
|
];
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
2021-09-03 23:44:54 +00:00
|
|
|
return $this->belongsTo('App\User', 'owner_user_id', 'id');
|
2021-03-30 00:27:49 +00:00
|
|
|
}
|
|
|
|
}
|