<?php

namespace App\Repositories\Eloquent;

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

class InnerOptionItemRepository extends BaseRepository
{
    protected function resolveModel(): Model
    {
        return new InnerOptionItem();
    }

    public function getByInnerOptionSet(int $innerOptionSetId)
    {
        return $this->model->where('inner_option_set_id', $innerOptionSetId)
            ->ordered()
            ->get();
    }

    public function getActiveByInnerOptionSet(int $innerOptionSetId)
    {
        return $this->model->where('inner_option_set_id', $innerOptionSetId)
            ->active()
            ->ordered()
            ->get();
    }
}
