<?php

namespace App\Repositories\Shop;

use App\Models\Shop\SaleChannel;
use App\Traits\Model\Basic;

class SaleChannels
{
    use Basic;

    public static function getDefaultID()
    {
        $default = self::getDefault();

        return $default ? self::getDefault()->id : false;
    }

    public static function getDefault()
    {
        return self::getByCode('EXP');
    }

    public static function getByCode($code)
    {
        return SaleChannel::byCode($code)->first();
    }

    public static function getModel()
    {
        return SaleChannel::query();
    }
}
