<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Grade extends Model
{
    protected $connection = 'tenant';
    protected $table = 'grade';
    protected $primaryKey = 'idGrade';
    public $timestamps = false;

    protected $fillable = [
        'sigleGrade',
        'nomGrade',
        'prixHeure'
    ];

    /**
     * Get the teachers with this grade
     */
    public function enseignants()
    {
        return $this->hasMany(Enseignant::class, 'idGrade', 'idGrade');
    }
}
