<?php

declare(strict_types=1);

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class GroupReleaseContributor extends Model
{
    use HasFactory;

    protected $fillable = [
        'group_release_id',
        'user_id',
        'role_label',
        'sort_order',
    ];

    public function release(): BelongsTo
    {
        return $this->belongsTo(GroupRelease::class, 'group_release_id');
    }

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}