2018-10-06 14:15:54 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Models\User;
|
|
|
|
|
|
|
|
use Engelsystem\Models\BaseModel;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
/**
|
2018-10-09 21:47:31 +02:00
|
|
|
* @property integer $user_id
|
|
|
|
*
|
|
|
|
* @property-read \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\User $user
|
2018-10-06 14:15:54 +02:00
|
|
|
*
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|static whereUserId($value)
|
|
|
|
*/
|
|
|
|
abstract class HasUserModel extends BaseModel
|
|
|
|
{
|
|
|
|
/** @var string The primary key for the model */
|
|
|
|
protected $primaryKey = 'user_id';
|
|
|
|
|
|
|
|
/** The attributes that are mass assignable */
|
|
|
|
protected $fillable = [
|
|
|
|
'user_id',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return BelongsTo
|
|
|
|
*/
|
|
|
|
public function user()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class);
|
|
|
|
}
|
|
|
|
}
|