server test version
This commit is contained in:
50
kernel/app_modules/card/models/CardTemplate.php
Normal file
50
kernel/app_modules/card/models/CardTemplate.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\app_modules\card\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property string $path
|
||||
* @property string $title
|
||||
* @property int $status
|
||||
*/
|
||||
class CardTemplate extends Model
|
||||
{
|
||||
|
||||
const DISABLE_STATUS = 0;
|
||||
const ACTIVE_STATUS = 1;
|
||||
|
||||
protected $table = 'card_template';
|
||||
|
||||
protected $fillable = ['path', 'title', 'status'];
|
||||
|
||||
public static function labels(): array
|
||||
{
|
||||
// Заполнить массив
|
||||
// Пример: [
|
||||
// 'label' => 'Заголовок',
|
||||
// 'entity' => 'Сущность',
|
||||
// 'slug' => 'Slug',
|
||||
// 'status' => 'Статус',
|
||||
// ]
|
||||
|
||||
return [
|
||||
'path' => 'Шаблон',
|
||||
'title' => 'Название',
|
||||
'status' => 'Статус',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getStatus(): array
|
||||
{
|
||||
return [
|
||||
self::DISABLE_STATUS => "Не активный",
|
||||
self::ACTIVE_STATUS => "Активный",
|
||||
];
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user