25 lines
591 B
PHP
25 lines
591 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Models\MarkList;
|
|
|
|
class Order extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'order_id', 'mark_no', 'description', 'origin', 'destination',
|
|
'ctn', 'qty', 'ttl_qty', 'unit', 'price', 'ttl_amount',
|
|
'cbm', 'ttl_cbm', 'kg', 'ttl_kg', 'shop_no', 'status'
|
|
];
|
|
|
|
// Relation using mark_no instead of id
|
|
public function markList()
|
|
{
|
|
return $this->hasOne(MarkList::class, 'mark_no', 'mark_no');
|
|
}
|
|
}
|