<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\GlobalModelEvents;

class Market extends Model
{
    use HasFactory, GlobalModelEvents;

    protected $fillable = [
        'name', 'slug', 'type', 'image', 'bid_margin', 'sell_margin', 'fake_bid_margin', 'fake_sell_margin',
    ];

    public function bids()
    {
        return $this->hasMany(Bid::class);
    }

    public function sells()
    {
        return $this->hasMany(Sell::class);
    }

    public function products()
    {
        return $this->hasMany(Product::class);
    }
}
