<?php

namespace App\Models;

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

class Surveys extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
        'description',
        'years',
        'status',
        'updated_at',
    ];

    public function questionSurveys(): HasMany
    {
        return $this->hasMany(QuestionSurveys::class, 'survey_id', 'id');
    }

    public function questionAnswers(): HasMany
    {
        return $this->hasMany(QuestionAnswers::class, 'survey_id', 'id');
    }
}
