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