1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 02:36:08 +02:00

Clean up Eloquent definitions

This commit is contained in:
Toby Zerner
2018-07-21 17:06:42 +09:30
parent 87bba2186e
commit 0fb81958cb
12 changed files with 43 additions and 66 deletions

View File

@@ -28,7 +28,9 @@ class AuthToken extends AbstractModel
protected $table = 'registration_tokens';
/**
* {@inheritdoc}
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['created_at'];

View File

@@ -24,12 +24,9 @@ use Flarum\User\Exception\InvalidConfirmationTokenException;
class EmailToken extends AbstractModel
{
/**
* {@inheritdoc}
*/
protected $table = 'email_tokens';
/**
* {@inheritdoc}
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['created_at'];
@@ -40,6 +37,11 @@ class EmailToken extends AbstractModel
*/
public $incrementing = false;
/**
* {@inheritdoc}
*/
protected $primaryKey = 'token';
/**
* Generate an email token for the specified user.
*

View File

@@ -22,12 +22,9 @@ use Flarum\Database\AbstractModel;
class PasswordToken extends AbstractModel
{
/**
* {@inheritdoc}
*/
protected $table = 'password_tokens';
/**
* {@inheritdoc}
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['created_at'];

View File

@@ -60,12 +60,9 @@ class User extends AbstractModel
use ScopeVisibilityTrait;
/**
* {@inheritdoc}
*/
protected $table = 'users';
/**
* {@inheritdoc}
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = [
'joined_at',