add EmailConfirmationToken persistence: model, migration, eloquent + fake repo
This commit is contained in:
parent
9747d07c31
commit
e16cb45387
7 changed files with 288 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Email\EmailConfirmationToken;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property string $token
|
||||
* @property DateTimeImmutable $available_to
|
||||
*
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel newModelQuery()
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel newQuery()
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel query()
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel whereId($value)
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel whereUserId($value)
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel whereToken($value)
|
||||
* @method static Builder<static>|EmailConfirmationTokenModel whereAvailableTo($value)
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class EmailConfirmationTokenModel extends Model
|
||||
{
|
||||
protected $table = 'email_confirmation_tokens';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'token',
|
||||
'available_to',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'available_to' => 'immutable_datetime',
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue