2021-06-26 17:23:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace BookStack\Auth;
|
2018-09-25 13:30:50 +02:00
|
|
|
|
2020-11-20 20:33:11 +01:00
|
|
|
use BookStack\Interfaces\Loggable;
|
2018-09-25 13:30:50 +02:00
|
|
|
use BookStack\Model;
|
2015-09-04 21:40:36 +02:00
|
|
|
|
2020-11-20 20:33:11 +01:00
|
|
|
/**
|
2021-06-26 17:23:15 +02:00
|
|
|
* Class SocialAccount.
|
|
|
|
*
|
2020-11-20 20:33:11 +01:00
|
|
|
* @property string $driver
|
2021-06-26 17:23:15 +02:00
|
|
|
* @property User $user
|
2020-11-20 20:33:11 +01:00
|
|
|
*/
|
|
|
|
class SocialAccount extends Model implements Loggable
|
2015-09-04 21:40:36 +02:00
|
|
|
{
|
|
|
|
protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
2016-05-01 22:20:50 +02:00
|
|
|
return $this->belongsTo(User::class);
|
2015-09-04 21:40:36 +02:00
|
|
|
}
|
2020-11-20 20:33:11 +01:00
|
|
|
|
|
|
|
/**
|
2021-10-26 23:04:18 +02:00
|
|
|
* {@inheritdoc}
|
2020-11-20 20:33:11 +01:00
|
|
|
*/
|
|
|
|
public function logDescriptor(): string
|
|
|
|
{
|
|
|
|
return "{$this->driver}; {$this->user->logDescriptor()}";
|
|
|
|
}
|
2015-09-04 21:40:36 +02:00
|
|
|
}
|