Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
Settings
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Engelsystem\Models\User;
6
7use Illuminate\Database\Eloquent\Factories\HasFactory;
8use Illuminate\Database\Query\Builder as QueryBuilder;
9
10/**
11 * @property string $language
12 * @property int    $theme
13 * @property bool   $email_human
14 * @property bool   $email_messages
15 * @property bool   $email_goodie
16 * @property bool   $email_shiftinfo
17 * @property bool   $email_news
18 * @property bool   $mobile_show
19 *
20 * @method static QueryBuilder|Settings[] whereLanguage($value)
21 * @method static QueryBuilder|Settings[] whereTheme($value)
22 * @method static QueryBuilder|Settings[] whereEmailHuman($value)
23 * @method static QueryBuilder|Settings[] whereEmailMessages($value)
24 * @method static QueryBuilder|Settings[] whereEmailGoodie($value)
25 * @method static QueryBuilder|Settings[] whereEmailShiftinfo($value)
26 * @method static QueryBuilder|Settings[] whereEmailNews($value)
27 * @method static QueryBuilder|Settings[] whereMobileShow($value)
28 */
29class Settings extends HasUserModel
30{
31    use HasFactory;
32
33    /** @var string The table associated with the model */
34    protected $table = 'users_settings'; // phpcs:ignore
35
36    /** @var array<string, bool> Default attributes */
37    protected $attributes = [ // phpcs:ignore
38        'email_human'     => false,
39        'email_messages'  => false,
40        'email_goodie'    => false,
41        'email_shiftinfo' => false,
42        'email_news'      => false,
43        'mobile_show'     => false,
44    ];
45
46    /**
47     * The attributes that are mass assignable.
48     *
49     * @var array<string>
50     */
51    protected $fillable = [ // phpcs:ignore
52        'user_id',
53        'language',
54        'theme',
55        'email_human',
56        'email_messages',
57        'email_goodie',
58        'email_shiftinfo',
59        'email_news',
60        'mobile_show',
61    ];
62
63    /** @var string[] */
64    protected $casts = [ // phpcs:ignore
65        'user_id'         => 'integer',
66        'theme'           => 'integer',
67        'email_human'     => 'boolean',
68        'email_messages'  => 'boolean',
69        'email_goodie'    => 'boolean',
70        'email_shiftinfo' => 'boolean',
71        'email_news'      => 'boolean',
72        'mobile_show'     => 'boolean',
73    ];
74}