2020-11-15 18:47:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Engelsystem\Models;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
|
|
|
use Engelsystem\Models\User\UsesUserModel;
|
|
|
|
use Illuminate\Database\Query\Builder as QueryBuilder;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property int $id
|
|
|
|
* @property string $provider
|
|
|
|
* @property string $identifier
|
2020-12-26 18:24:20 +01:00
|
|
|
* @property string $access_token
|
|
|
|
* @property string $refresh_token
|
|
|
|
* @property Carbon|null $expires_at
|
2020-11-15 18:47:30 +01:00
|
|
|
* @property Carbon|null $created_at
|
|
|
|
* @property Carbon|null $updated_at
|
|
|
|
*
|
|
|
|
* @method static QueryBuilder|OAuth[] whereId($value)
|
|
|
|
* @method static QueryBuilder|OAuth[] whereProvider($value)
|
|
|
|
* @method static QueryBuilder|OAuth[] whereIdentifier($value)
|
2020-12-26 18:24:20 +01:00
|
|
|
* @method static QueryBuilder|OAuth[] whereAccessToken($value)
|
|
|
|
* @method static QueryBuilder|OAuth[] whereRefreshToken($value)
|
2020-11-15 18:47:30 +01:00
|
|
|
*/
|
|
|
|
class OAuth extends BaseModel
|
|
|
|
{
|
|
|
|
use UsesUserModel;
|
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
public $table = 'oauth'; // phpcs:ignore
|
2020-11-15 18:47:30 +01:00
|
|
|
|
|
|
|
/** @var bool Enable timestamps */
|
2022-12-15 19:50:56 +01:00
|
|
|
public $timestamps = true; // phpcs:ignore
|
2020-11-15 18:47:30 +01:00
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
/** @var array<string, string> */
|
|
|
|
protected $casts = [ // phpcs:ignore
|
2021-12-04 10:59:03 +01:00
|
|
|
'user_id' => 'integer',
|
|
|
|
];
|
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
/** @var array<string> */
|
|
|
|
protected $dates = [ // phpcs:ignore
|
2020-12-26 18:24:20 +01:00
|
|
|
'expires_at',
|
|
|
|
];
|
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
/** @var array<string> */
|
|
|
|
protected $fillable = [ // phpcs:ignore
|
2020-11-15 18:47:30 +01:00
|
|
|
'provider',
|
|
|
|
'identifier',
|
2020-12-26 18:24:20 +01:00
|
|
|
'access_token',
|
|
|
|
'refresh_token',
|
|
|
|
'expires_at',
|
2020-11-15 18:47:30 +01:00
|
|
|
];
|
|
|
|
}
|