All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 26s
45 lines
947 B
PHP
45 lines
947 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class SparePacking extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'plant_id',
|
|
'item_id',
|
|
'sale_order_master_id',
|
|
'spare_packing_number',
|
|
'document_number',
|
|
'batch_number',
|
|
'quantity',
|
|
'spare_packing_status',
|
|
'created_at',
|
|
'created_by',
|
|
'updated_at',
|
|
'updated_by',
|
|
'scanned_at',
|
|
'scanned_by',
|
|
|
|
];
|
|
|
|
public function plant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Plant::class);
|
|
}
|
|
public function item(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Item::class, 'item_id');
|
|
}
|
|
|
|
public function saleOrder(): BelongsTo
|
|
{
|
|
return $this->belongsTo(SaleOrderMaster::class, 'sale_order_master_id');
|
|
}
|
|
}
|