<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class QualityValidation extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'sticker_master_id',
		'plant_id',
        'line_id',
		'production_order',
        'serial_number_motor',
        'serial_number_pump',
        'serial_number_pumpset',
        'pack_slip_motor',
        'pack_slip_pump',
        'pack_slip_pumpset',
        'name_plate_motor',
        'name_plate_pump',
        'name_plate_pumpset',
        'tube_sticker_motor',
        'tube_sticker_pump',
        'tube_sticker_pumpset',
        'warranty_card',
        'part_validation1',
        'part_validation2',
        'part_validation3',
        'part_validation4',
        'part_validation5',
        'operator_id',
        'uom',
        'created_at',
        'updated_at',
        'serial_number',
        'sap_msg_status',
        'sap_msg_description',
    ];

    public function stickerMaster(): BelongsTo
    {
        return $this->belongsTo(StickerMaster::class);
    }

    public function plant(): BelongsTo
    {
        return $this->belongsTo(Plant::class);
    }

    public function line(): BelongsTo
    {
        return $this->belongsTo(Line::class);
    }
}
