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:
@@ -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'];
|
||||
|
||||
|
@@ -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.
|
||||
*
|
||||
|
@@ -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'];
|
||||
|
||||
|
@@ -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',
|
||||
|
Reference in New Issue
Block a user