2024-12-03 16:16:36 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
2024-12-09 16:26:12 +03:00
|
|
|
|
namespace kernel\app_modules\slider\models;
|
2024-12-03 16:16:36 +03:00
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @property int $id
|
|
|
|
|
* @property string $title
|
2024-12-09 12:57:12 +03:00
|
|
|
|
* @property string $additional_information
|
2024-12-03 16:16:36 +03:00
|
|
|
|
* @property string $content
|
2024-12-09 12:57:12 +03:00
|
|
|
|
* @property string $link
|
2024-12-03 16:16:36 +03:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class Slider extends Model
|
|
|
|
|
{
|
|
|
|
|
const int DISABLE_STATUS = 0;
|
|
|
|
|
const int ACTIVE_STATUS = 1;
|
|
|
|
|
|
|
|
|
|
protected $table = "slider";
|
2024-12-09 12:57:12 +03:00
|
|
|
|
protected $fillable = ['title', 'additional_information', 'content', 'link'];
|
2024-12-03 16:16:36 +03:00
|
|
|
|
|
|
|
|
|
public static function labels()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'title' => 'Заголовок',
|
2024-12-09 12:57:12 +03:00
|
|
|
|
'content' => 'Контент',
|
|
|
|
|
'link' => 'Ссылка',
|
2024-12-03 16:16:36 +03:00
|
|
|
|
'additional_information' => 'Дополнительная информация',
|
2024-12-09 12:57:12 +03:00
|
|
|
|
'status' => 'Статус'
|
2024-12-03 16:16:36 +03:00
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function getStatus(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
self::DISABLE_STATUS => "Не активный",
|
|
|
|
|
self::ACTIVE_STATUS => "Активный",
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|