Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 31s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 31s
Laravel Pint / pint (pull_request) Successful in 1m54s
Laravel Larastan / larastan (pull_request) Failing after 4m3s
57 lines
1.1 KiB
PHP
57 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class ProductionCharacteristic extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $casts = [
|
|
'result' => 'array',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'plant_id',
|
|
'line_id',
|
|
'item_id',
|
|
'machine_id',
|
|
'production_order',
|
|
'serial_number',
|
|
'observed_value',
|
|
'characteristic_name',
|
|
'status',
|
|
'inspection_status',
|
|
'inspection_lot_number',
|
|
'remark',
|
|
'result',
|
|
'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 item(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Item::class);
|
|
}
|
|
|
|
public function machine(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Machine::class);
|
|
}
|
|
}
|