BookStack/app/Access/SocialAccount.php

32 lines
604 B
PHP
Raw Normal View History

2021-06-26 23:23:15 +08:00
<?php
2023-05-18 00:56:55 +08:00
namespace BookStack\Access;
2023-05-18 00:56:55 +08:00
use BookStack\Activity\Models\Loggable;
use BookStack\App\Model;
use BookStack\Users\Models\User;
2015-09-05 03:40:36 +08:00
/**
2021-06-26 23:23:15 +08:00
* Class SocialAccount.
*
* @property string $driver
2021-06-26 23:23:15 +08:00
* @property User $user
*/
class SocialAccount extends Model implements Loggable
2015-09-05 03:40:36 +08:00
{
protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
public function user()
{
return $this->belongsTo(User::class);
2015-09-05 03:40:36 +08:00
}
/**
* {@inheritdoc}
*/
public function logDescriptor(): string
{
return "{$this->driver}; {$this->user->logDescriptor()}";
}
2015-09-05 03:40:36 +08:00
}