<?php

namespace kernel\app_modules\tag\models;

use Illuminate\Database\Eloquent\Model;

/**
 * @property int $id
 * @property string $label
 * @property string $entity
 * @property string $slug
 * @property int $status
 * @method static where(int[] $array)
 * @method static find($id)
 */
class Tag extends Model
{
    const DISABLE_STATUS = 0;
    const ACTIVE_STATUS = 1;

    protected $table = 'tag';

    protected $fillable = ['label', 'entity', 'slug', 'status'];

    public static function labels(): array
    {
        return [
            'label' => 'Заголовок',
            'entity' => 'Сущность',
            'slug' => 'Slug',
            'status' => 'Статус',
        ];
    }

    /**
     * @return string[]
     */
    public static function getStatus(): array
    {
        return [
            self::DISABLE_STATUS => "Не активный",
            self::ACTIVE_STATUS => "Активный",
        ];
    }

}