Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
HasUserModel | 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\User; |
6 | |
7 | use Engelsystem\Models\BaseModel; |
8 | |
9 | abstract class HasUserModel extends BaseModel |
10 | { |
11 | use UsesUserModel; |
12 | |
13 | /** @var string The primary key for the model */ |
14 | protected $primaryKey = 'user_id'; // phpcs:ignore |
15 | |
16 | /** |
17 | * The attributes that are mass assignable. |
18 | * |
19 | * @var array<string> |
20 | */ |
21 | protected $fillable = [ // phpcs:ignore |
22 | 'user_id', |
23 | ]; |
24 | |
25 | /** @var array<string> */ |
26 | protected $casts = [ // phpcs:ignore |
27 | 'user_id' => 'integer', |
28 | ]; |
29 | |
30 | /** |
31 | * The relationships that should be touched on save |
32 | * |
33 | * @var array<string> |
34 | */ |
35 | protected $touches = ['user']; // phpcs:ignore |
36 | } |