<?php

namespace App;

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

class Brands extends Model
{
//    use HasFactory;

    protected $primaryKey = 'id_brands';
    protected $table = 'brands';
    protected $fillable = [
        'suppliers_id',
        'brands_name',
        'brands_abbrevation',
        'brands_logo',
        'brands_image',
        'brands_status',
        'created_by',
    ];

    public function products()
    {
        return $this->hasMany(Products::class, 'brands_id');
    }

    public function suppliers()
    {
        return $this->belongsTo(Suppliers::class, 'suppliers_id');
    }
}
