<?php

namespace kernel\app_modules\user_stage\models;

use Illuminate\Database\Eloquent\Model;

/**
 * @property int $user_id
 * @property int $user_stage_id
 * @property int $status
 * @property bool $is_completed
 * @property bool $is_closed
 * @property string $completed_at
 */
class UserStageProgress extends Model
{

    protected $table = 'user_stage_progress';

    protected $fillable = ['user_id', 'user_stage_id', 'is_completed', 'is_closed', 'completed_at', 'status'];

    public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    public function stage(): \Illuminate\Database\Eloquent\Relations\BelongsTo
    {
        return $this->belongsTo(UserStage::class);
    }

}