<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use OwenIt\Auditing\Contracts\Auditable;
use OwenIt\Auditing\Auditable as AuditableTrait;
class RoleGroup extends Model implements Auditable
{
    use HasFactory,AuditableTrait;

    protected $table = "role_groups";
    protected $guarded =[
        'deleted_at'
    ];

    protected $casts = [
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'deleted_at' => 'datetime',
    ];

    public function system()
    {
        return $this->hasOne(
            Apps::class,
            'id',
            'system_id'
        );
    }
}
