<?php

namespace App;

use App\Traits\ModelTimeFormat;
use Illuminate\Database\Eloquent\Model;

use App\Traits\ModelLogChanging;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class OracleActAllocationDetails extends Model
{
    use ModelLogChanging;
    use ModelTimeFormat;

    protected $connection="oracle";
    protected $primaryKey="ALLOCATIONDETAILSID";
    protected $table="act_allocation_details";
    public $timestamps=false;
    public function getIncrementing(){ return false;}

    public function oracleDocOrderHeader(): BelongsTo
    {
        return $this->belongsTo('App\OracleDOCOrderHeader','orderno','orderno');
    }

    public function oracleDocOrderSerialNos(): HasMany
    {
        return $this->hasMany(OracleDocOrderSerialNo::class,'allocationdetailsid','allocationdetailsid');
    }

}
