<?php

namespace App\Repositories;

use App\Models\Tdaftarexcul;

class DaftarexculRepository
{
    public function getStatus0Count(): int
    {
        return Tdaftarexcul::where('sta', 0)->count();
    }

    public function getStatus0List($limit = 10)
    {
        return Tdaftarexcul::where('sta', 0)
            ->select(['id', 'nose', 'tin', 'idta', 'tgl', 'idsis', 'tglex'])
            ->latest('tgl')
            ->limit($limit)
            ->get();
    }
}
