<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class MathChapter extends LegacyModel
{
    protected $table = 'mathchapters';

    protected function casts(): array
    {
        return [
            'createdtime' => 'datetime',
        ];
    }

    public function group(): BelongsTo
    {
        return $this->belongsTo(StudentGroup::class, 'classgroupid');
    }

    public function subject(): BelongsTo
    {
        return $this->belongsTo(StudentSubject::class, 'subjectid');
    }
}
