la_bot_back/kernel/app_modules/tgbot/models/TgbotNotification.php
2025-01-27 20:03:58 +03:00

53 lines
1.2 KiB
PHP
Raw Permalink 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 kernel\app_modules\tgbot\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property integer $bot_id
* @property integer $dialog_id
* @property string $to_group
* @property string $content
* @property string $photo
* @property integer $status
*/
class TgbotNotification extends Model
{
const DISABLE_STATUS = 0;
const NEW_STATUS = 1;
const TO_SEND_STATUS = 2;
const SENT_STATUS = 3;
protected $table = 'tgbot_notification';
protected $fillable = ['bot_id', 'dialog_id', 'to_group', 'content', 'photo', 'status'];
public static function labels(): array
{
return [
'bot_id' => 'Bot ID',
'dialog_id' => 'Dialog ID',
'to_group' => 'Group',
'content' => 'Контент',
'photo' => 'Фото',
'status' => 'Статус',
];
}
/**
* @return string[]
*/
public static function getStatus(): array
{
return [
self::DISABLE_STATUS => "Не активный",
self::NEW_STATUS => "Новое",
self::TO_SEND_STATUS => "На отправку",
self::SENT_STATUS => "Отправлено",
];
}
}