Added product characteristics model file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 1m22s
Laravel Larastan / larastan (pull_request) Failing after 3m14s
Laravel Pint / pint (pull_request) Successful in 2m22s

This commit is contained in:
dhanabalan
2025-12-05 14:31:08 +05:30
parent 95ed717020
commit 04eb933997

View File

@@ -0,0 +1,60 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class ProductCharacteristicsMaster extends Model
{
use SoftDeletes;
protected $fillable = [
'plant_id',
'line_id',
'item_id',
'work_group_master_id',
'machine_id',
'name',
'inspection_type',
'characteristics_type',
'upper',
'lower',
'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);
}
}