<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\QuerySetting;

class Store extends Model
{
    use HasFactory;
    
    public function gethomepageStores($query)
    {
	$data = constant("Store::".$query."->get()");
	return $data;
    }

    public function category()
    {
        return $this->belongsTo(Category::class);
    }

    public function event()
    {
        return $this->belongsTo(Event::class);
    }

    public function coupons()
    {
        return $this->hasMany(Coupon::class);
    }

}
