<?php

namespace App\Models;

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

class PointPelanggaran extends Model
{
    use HasFactory;

    protected $table = 'point_pelanggarans';

    protected $primaryKey = 'id_point_pelanggaran';

    protected $fillable = [
        'jenis_pelanggaran',
        'point',
    ];

    public function point(): HasMany
    {
        return $this->hasMany(Pelanggaran::class, 'id_pelanggaran', 'id_pelanggaran');
    }
}
