2018-10-06 14:15:54 +02:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-10-06 14:15:54 +02:00
|
|
|
namespace Engelsystem\Models\User;
|
|
|
|
|
|
|
|
use Engelsystem\Models\BaseModel;
|
|
|
|
|
|
|
|
abstract class HasUserModel extends BaseModel
|
|
|
|
{
|
2019-11-03 00:25:35 +01:00
|
|
|
use UsesUserModel;
|
|
|
|
|
2018-10-06 14:15:54 +02:00
|
|
|
/** @var string The primary key for the model */
|
2022-12-15 19:50:56 +01:00
|
|
|
protected $primaryKey = 'user_id'; // phpcs:ignore
|
2018-10-06 14:15:54 +02:00
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array<string>
|
|
|
|
*/
|
|
|
|
protected $fillable = [ // phpcs:ignore
|
2018-10-06 14:15:54 +02:00
|
|
|
'user_id',
|
|
|
|
];
|
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
/** @var array<string> */
|
|
|
|
protected $casts = [ // phpcs:ignore
|
2021-12-04 10:59:03 +01:00
|
|
|
'user_id' => 'integer',
|
|
|
|
];
|
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
/**
|
|
|
|
* The relationships that should be touched on save
|
|
|
|
*
|
|
|
|
* @var array<string>
|
|
|
|
*/
|
|
|
|
protected $touches = ['user']; // phpcs:ignore
|
2018-10-06 14:15:54 +02:00
|
|
|
}
|