<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Yajra\Oci8\Eloquent\OracleEloquent;
use Illuminate\Database\Eloquent\Relations\HasMany;

class IprsNewService extends OracleEloquent
{
    use HasFactory;

    protected $fillable = [
        'SERVICE_NAME',
        'SERVICE_GROUP_ID',
        'SERVICE_FIELD_ID'
    ];

    public function iprsNewServiceGroup(): BelongsTo
    {
        return $this->belongsTo(IprsNewServiceGroup::class, 'service_group_id', 'id');
    }

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