1 | <?php |
||
10 | class UserPreferences extends Model |
||
11 | { |
||
12 | /** |
||
13 | * Disable Timestamps. |
||
14 | * |
||
15 | * @var bool |
||
16 | */ |
||
17 | public $timestamps = false; |
||
18 | |||
19 | /** |
||
20 | * The table associated with the model. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $table = 'chocolatey_users_preferences'; |
||
25 | |||
26 | /** |
||
27 | * Primary Key of the Table. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $primaryKey = 'user_id'; |
||
32 | |||
33 | /** |
||
34 | * The attributes excluded from the model's JSON form. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $hidden = ['user_id']; |
||
39 | |||
40 | /** |
||
41 | * The attributes that are mass assignable. |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $fillable = ['emailFriendRequestNotificationEnabled', 'emailGiftNotificationEnabled', 'emailGroupNotificationEnabled', 'emailMiniMailNotificationEnabled', |
||
46 | 'emailNewsletterEnabled', 'emailRoomMessageNotificationEnabled', 'friendCanFollow', 'friendRequestEnabled', 'offlineMessagingEnabled', 'onlineStatusVisible', 'profileVisible', ]; |
||
47 | |||
48 | /** |
||
49 | * Store an User Preference set on the Database. |
||
50 | * |
||
51 | * @param int $userId |
||
52 | * |
||
53 | * @return UserPreferences |
||
54 | */ |
||
55 | public function store(int $userId): UserPreferences |
||
64 | } |
||
65 |