Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
Session | 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\User; |
9 | use Engelsystem\Models\User\UsesUserModel; |
10 | use Illuminate\Database\Eloquent\Builder; |
11 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
12 | |
13 | /** |
14 | * @property string $id |
15 | * @property string $payload |
16 | * @property int|null $user_id |
17 | * @property Carbon $last_activity |
18 | * |
19 | * @property-read User|null $user |
20 | * |
21 | * @method static Builder|Session whereId($value) |
22 | * @method static Builder|Session wherePayload($value) |
23 | * @method static Builder|Session whereLastActivity($value) |
24 | */ |
25 | class Session extends BaseModel |
26 | { |
27 | use HasFactory; |
28 | use UsesUserModel; |
29 | |
30 | public $incrementing = false; // phpcs:ignore |
31 | |
32 | protected $keyType = 'string'; // phpcs:ignore |
33 | |
34 | /** @var array<string, string|null> default attributes */ |
35 | protected $attributes = [ // phpcs:ignore |
36 | 'payload' => '', |
37 | 'user_id' => null, |
38 | ]; |
39 | |
40 | /** @var array<string> */ |
41 | protected $fillable = [ // phpcs:ignore |
42 | 'id', |
43 | 'payload', |
44 | 'user_id', |
45 | ]; |
46 | |
47 | /** @var array<string, string> */ |
48 | protected $casts = [ // phpcs:ignore |
49 | 'user_id' => 'integer', |
50 | 'last_activity' => 'datetime', |
51 | ]; |
52 | } |