<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class BarcodeDetails extends Model
{
    use HasFactory;

    protected $table = 'barcode_details';

    protected $fillable = [
        'barcode_id',
        'user_id',
        'description',
        'status',
        'created_by',
        'created_at',
    ];

    public function barcode()
    {
        return $this->belongsTo(Barcode::class, 'barcode_id');
    }

    public function user()
    {
        return $this->belongsTo(Users::class, 'user_id');
    }
}
