Files
pds/app/Models/ProductCharacteristicsMaster.php
dhanabalan 67ffbf68fd
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Updated fillable order in model file
2026-02-16 12:21:36 +05:30

60 lines
1.2 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class ProductCharacteristicsMaster extends Model
{
use SoftDeletes;
protected $fillable = [
'plant_id',
'item_id',
'line_id',
'work_group_master_id',
'machine_id',
'characteristics_type',
'name',
'inspection_type',
'lower',
'upper',
'middle',
'created_at',
'updated_at',
'created_by',
'updated_by',
];
public function plant(): BelongsTo
{
return $this->belongsTo(Plant::class);
}
public function line(): BelongsTo
{
return $this->belongsTo(Line::class);
}
public function workGroupMaster(): BelongsTo
{
return $this->belongsTo(WorkGroupMaster::class);
}
public function machine(): BelongsTo
{
return $this->belongsTo(Machine::class);
}
// public function machine()
// {
// return $this->belongsTo(\App\Models\Machine::class, 'machine_id');
// }
public function item(): BelongsTo
{
return $this->belongsTo(Item::class);
}
}