igfs/app/modules/module_shop/models/ModuleShop.php
2024-10-16 16:06:25 +03:00

52 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\modules\module_shop\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $name
* @property string $slug
* @property string $version
* @property string $description
* @property string $author
* @property int $status
* @property string $path_to_archive
* @property string $dependence
*/
class ModuleShop extends Model
{
const DISABLE_STATUS = 0;
const ACTIVE_STATUS = 1;
protected $table = "module_shop";
protected $fillable = ['name', 'slug', 'version', 'description', 'author', 'status', 'path_to_archive', 'dependence'];
public static function labels(): array
{
return [
'name' => 'Название',
'version' => 'Версия',
'description' => 'Описание',
'author' => 'Автор',
'status' => 'Статус',
'slug' => 'Slug',
'path_to_archive' => 'Путь к файлу модуля',
'dependence' => 'Зависимости',
];
}
/**
* @return string[]
*/
public static function getStatus(): array
{
return [
self::DISABLE_STATUS => "Не активный",
self::ACTIVE_STATUS => "Активный",
];
}
}