<?php

namespace App;

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

use App\Traits\ModelLogChanging;

class OracleDOCASNDetail extends Model
{
    use ModelLogChanging;

    use ModelTimeFormat;
    protected $connection="oracle";
    protected $table="Doc_ASN_Details";


    public function oracleDocAsnHeader(){
        return $this->belongsTo('App\OracleDOCASNHeader','asnno','asnno');
    }
    public function lineStatus()
    {
        return $this->hasOne(OracleBasCode::class,'code','linestatus')
            ->where('codeid','ASN_STS');
    }
    public function qualityStatus()
    {
        return $this->hasOne(OracleBasCode::class,'code','lotatt08')
            ->where('codeid','QLT_STS');
    }
}
