<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class School extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'name_fa',
        'name_en',
        'school_code',
        'province',
        'city',
        'address',
        'phone',
        'logo_path',
        'primary_color',
        'status',
    ];

    public function users(): HasMany
    {
        return $this->hasMany(User::class);
    }

    public function students(): HasMany
    {
        return $this->hasMany(Student::class);
    }

    public function modules(): HasMany
    {
        return $this->hasMany(SchoolModule::class);
    }
}
