forked from HDInnovations/UNIT3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserSetting.php
76 lines (69 loc) · 2.4 KB
/
UserSetting.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
declare(strict_types=1);
/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author HDVinnie <hdinnovations@protonmail.com>
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\UserSetting.
*
* @property int $id
* @property int $user_id
* @property bool $censor
* @property bool $chat_hidden
* @property string $locale
* @property int $style
* @property int $torrent_layout
* @property bool $torrent_filters
* @property ?string $custom_css
* @property ?string $standalone_css
* @property bool $show_poster
* @property bool $unbookmark_torrents_on_completion
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
*/
class UserSetting extends Model
{
/** @use HasFactory<\Database\Factories\UserSettingFactory> */
use HasFactory;
/**
* Get the attributes that should be cast.
*
* @return array{
* censor: 'bool',
* chat_hidden: 'bool',
* torrent_filters: 'bool',
* show_poster: 'bool',
* unbookmark_torrents_on_completion: 'bool',
* }
*/
protected function casts(): array
{
return [
'censor' => 'bool',
'chat_hidden' => 'bool',
'torrent_filters' => 'bool',
'show_poster' => 'bool',
'unbookmark_torrents_on_completion' => 'bool',
];
}
/**
* Belongs To A User.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<User, $this>
*/
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class);
}
}