<?php

namespace App\Models\Core\Auth;

use Illuminate\Database\Eloquent\Model;

class UserStatus extends Model
{
    public $timestamps = false;

    protected $connection = 'mysql';

    protected $guarded = [];

    protected $table = 'user_statuses';

    public function scopeByName($query, $name)
    {
        return $query->where('name', $name);
    }

    public function scopeByTranslated($query, $translated)
    {
        return $query->where('translated', $translated);
    }

    public function scopeByNegociator($query)
    {
        return $query->where('negociator', '>', 0);
    }

    public function scopeActive($query)
    {
        return $query->where('active', 1);
    }
}
