ranjith-dev #382
44
app/Models/WireMasterPacking.php
Normal file
44
app/Models/WireMasterPacking.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class WireMasterPacking extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'plant_id',
|
||||
'item_id',
|
||||
'customer_po_master_id',
|
||||
'wire_packing_number',
|
||||
'process_order',
|
||||
'batch_number',
|
||||
'weight',
|
||||
'wire_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 customerPo(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CustomerPoMaster::class, 'customer_po_master_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user