2021-06-26 23:23:15 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace BookStack\Auth;
|
2018-09-25 19:30:50 +08:00
|
|
|
|
2020-11-21 03:33:11 +08:00
|
|
|
use BookStack\Interfaces\Loggable;
|
2018-09-25 19:30:50 +08:00
|
|
|
use BookStack\Model;
|
2015-09-05 03:40:36 +08:00
|
|
|
|
2020-11-21 03:33:11 +08:00
|
|
|
/**
|
2021-06-26 23:23:15 +08:00
|
|
|
* Class SocialAccount.
|
|
|
|
*
|
2020-11-21 03:33:11 +08:00
|
|
|
* @property string $driver
|
2021-06-26 23:23:15 +08:00
|
|
|
* @property User $user
|
2020-11-21 03:33:11 +08:00
|
|
|
*/
|
|
|
|
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()
|
|
|
|
{
|
2016-05-02 04:20:50 +08:00
|
|
|
return $this->belongsTo(User::class);
|
2015-09-05 03:40:36 +08:00
|
|
|
}
|
2020-11-21 03:33:11 +08:00
|
|
|
|
|
|
|
/**
|
2021-10-27 05:04:18 +08:00
|
|
|
* {@inheritdoc}
|
2020-11-21 03:33:11 +08:00
|
|
|
*/
|
|
|
|
public function logDescriptor(): string
|
|
|
|
{
|
|
|
|
return "{$this->driver}; {$this->user->logDescriptor()}";
|
|
|
|
}
|
2015-09-05 03:40:36 +08:00
|
|
|
}
|