<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\traits\SetConnection;

class RelationStoreArea extends Model
{
    use SetConnection;

    public static function getShopId($pref_id, $city_id, $town_id) {
        $result = RelationStoreArea::select('store_id')->where('pref_id', $pref_id)
            ->where('city_id', $city_id)
            ->where('town_id', $town_id)
            ->first();


        return $result;
    }
    public static function getShopIdCompany3($pref_id, $city_id) {
        $result = RelationStoreArea::select('store_id')->where('pref_id', $pref_id)
            ->where('city_id', $city_id)
            ->first();


        return $result;
    }
}
