39 lines
1 KiB
PHP
39 lines
1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property integer $id Primary key of the gitlab user.
|
|
* @property integer $user_id Gitlab id of the user.
|
|
* @property integer $gitlab_id Id of the user.
|
|
* @property-read \Illuminate\Support\Carbon $created_at Date the gitlab user was created.
|
|
* @property-read \Illuminate\Support\Carbon $updated_at Date the gitlab user was updated.
|
|
*/
|
|
class GitlabUser extends Model
|
|
{
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var list<string>
|
|
*/
|
|
#[\Override]
|
|
protected $fillable = [
|
|
'user_id',
|
|
'gitlab_id',
|
|
];
|
|
|
|
// * RELATIONSHIPS.
|
|
|
|
/**
|
|
* Get user of the gitlab id.
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\User,$this>
|
|
*/
|
|
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|