<?php

namespace App\Distributor\Repositories;

use App\Models\SiteBanner as Model;
use Dcat\Admin\Repositories\EloquentRepository;

class SiteBanner extends EloquentRepository
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Model::class;

    /**
     * 得到位置数据
     * @param $id
     * @return mixed
     */
    public static function getPositionOptions() {
        $data = Model::query()->where('dist_id',getDistributorId())->select('position')->distinct()->get()->pluck('position', 'position');
        return $data;
    }
}
