mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 04:13:42 +01:00
c7a2d568bf
Tools seems to fit better since the classes were a bit of a mixed bunch and did not always manage. Also simplified the structure of the SlugGenerator class. Also focused EntityContext on shelves and simplified to use session helper.
29 lines
552 B
PHP
29 lines
552 B
PHP
<?php namespace BookStack\Auth;
|
|
|
|
use BookStack\Interfaces\Loggable;
|
|
use BookStack\Model;
|
|
|
|
/**
|
|
* Class SocialAccount
|
|
* @property string $driver
|
|
* @property User $user
|
|
*/
|
|
class SocialAccount extends Model implements Loggable
|
|
{
|
|
|
|
protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function logDescriptor(): string
|
|
{
|
|
return "{$this->driver}; {$this->user->logDescriptor()}";
|
|
}
|
|
}
|