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