All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
42 lines
989 B
PHP
42 lines
989 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class PanelGrMaster extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'plant_id',
|
|
'item_id',
|
|
'inspection_lot_number',
|
|
'document_number',
|
|
'invoice_number',
|
|
'supplier_number',
|
|
'quantity',
|
|
'created_by',
|
|
'updated_by'
|
|
];
|
|
|
|
public function plant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Plant::class);
|
|
}
|
|
|
|
public function item(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Item::class);
|
|
}
|
|
|
|
public function panelBoxValidations()
|
|
{
|
|
return $this->hasMany(PanelBoxValidation::class, 'plant_id', 'plant_id')
|
|
->whereColumn('production_order', 'panel_gr_masters.document_number')
|
|
->whereColumn('inspection_lot_number', 'panel_gr_masters.inspection_lot_number');
|
|
}
|
|
}
|