<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GroupStep extends Model
{
    protected $table = 'group_steps';

    protected $fillable = [
        'modular_id', 'previous', 'next'
    ];

    public function steps()
    {
        return $this->hasMany(Step::class, 'group_id');
    }

    public function ModularStep(){
        return $this->belongsTo(ModularStep::class, 'modular_id');
    }
}
