<?php

namespace App\Repositories\Eloquent;

use App\Models\OptionSetItem;
use Illuminate\Database\Eloquent\Model;

class OptionSetItemRepository extends BaseRepository
{
    protected function resolveModel(): Model
    {
        return new OptionSetItem();
    }

    public function getByOptionSet(int $optionSetId)
    {
        return $this->model->where('option_set_id', $optionSetId)
            ->ordered()
            ->get();
    }

    public function getActiveByOptionSet(int $optionSetId)
    {
        return $this->model->where('option_set_id', $optionSetId)
            ->active()
            ->ordered()
            ->get();
    }
}
