Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
OAuth | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Engelsystem\Models; |
6 | |
7 | use Carbon\Carbon; |
8 | use Engelsystem\Models\User\UsesUserModel; |
9 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
10 | use Illuminate\Database\Query\Builder as QueryBuilder; |
11 | |
12 | /** |
13 | * @property int $id |
14 | * @property string $provider |
15 | * @property string $identifier |
16 | * @property string|null $access_token |
17 | * @property string|null $refresh_token |
18 | * @property Carbon|null $expires_at |
19 | * @property Carbon|null $created_at |
20 | * @property Carbon|null $updated_at |
21 | * |
22 | * @method static QueryBuilder|OAuth[] whereId($value) |
23 | * @method static QueryBuilder|OAuth[] whereProvider($value) |
24 | * @method static QueryBuilder|OAuth[] whereIdentifier($value) |
25 | * @method static QueryBuilder|OAuth[] whereAccessToken($value) |
26 | * @method static QueryBuilder|OAuth[] whereRefreshToken($value) |
27 | */ |
28 | class OAuth extends BaseModel |
29 | { |
30 | use HasFactory; |
31 | use UsesUserModel; |
32 | |
33 | public $table = 'oauth'; // phpcs:ignore |
34 | |
35 | /** @var array<string, null> default attributes */ |
36 | protected $attributes = [ // phpcs:ignore |
37 | 'access_token' => null, |
38 | 'refresh_token' => null, |
39 | 'expires_at' => null, |
40 | ]; |
41 | |
42 | /** @var bool Enable timestamps */ |
43 | public $timestamps = true; // phpcs:ignore |
44 | |
45 | /** @var array<string, string> */ |
46 | protected $casts = [ // phpcs:ignore |
47 | 'user_id' => 'integer', |
48 | 'expires_at' => 'datetime', |
49 | ]; |
50 | |
51 | /** @var array<string> */ |
52 | protected $fillable = [ // phpcs:ignore |
53 | 'provider', |
54 | 'identifier', |
55 | 'access_token', |
56 | 'refresh_token', |
57 | 'expires_at', |
58 | ]; |
59 | } |