Added spare packing model file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 26s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 26s
This commit is contained in:
44
app/Models/SparePacking.php
Normal file
44
app/Models/SparePacking.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 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');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user