Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
74 lines
1.9 KiB
PHP
Executable File
74 lines
1.9 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\RSpade\Lib\Flash;
|
|
|
|
use App\RSpade\Core\Database\Models\Rsx_Model_Abstract;
|
|
|
|
/**
|
|
* _AUTO_GENERATED_
|
|
* @property integer $id
|
|
* @property integer $session_id
|
|
* @property integer $type_id
|
|
* @property string $message
|
|
* @property \Carbon\Carbon $created_at
|
|
* @property integer $created_by
|
|
* @property integer $updated_by
|
|
* @property \Carbon\Carbon $updated_at
|
|
* @method static mixed type_id_enum()
|
|
* @method static mixed type_id_enum_select()
|
|
* @method static mixed type_id_enum_ids()
|
|
* @property-read mixed $type_id_constant
|
|
* @property-read mixed $type_id_label
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Flash_Alert_Model extends Rsx_Model_Abstract
|
|
{
|
|
/** __AUTO_GENERATED: */
|
|
const TYPE_SUCCESS = 1;
|
|
const TYPE_ERROR = 2;
|
|
const TYPE_INFO = 3;
|
|
const TYPE_WARNING = 4;
|
|
/** __/AUTO_GENERATED */
|
|
|
|
// Enum constants (auto-generated by rsx:migrate:document_models)
|
|
|
|
public static $enums = [
|
|
'type_id' => [
|
|
1 => ['constant' => 'TYPE_SUCCESS', 'label' => 'Success'],
|
|
2 => ['constant' => 'TYPE_ERROR', 'label' => 'Error'],
|
|
3 => ['constant' => 'TYPE_INFO', 'label' => 'Info'],
|
|
4 => ['constant' => 'TYPE_WARNING', 'label' => 'Warning'],
|
|
],
|
|
];
|
|
|
|
public static $rel = [];
|
|
|
|
protected $table = '_flash_alerts';
|
|
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
|
|
/**
|
|
* Get the type as a string for client consumption
|
|
*
|
|
* @return string 'success'|'error'|'info'|'warning'
|
|
*/
|
|
public function get_type_string(): string
|
|
{
|
|
$type_map = [
|
|
self::TYPE_SUCCESS => 'success',
|
|
self::TYPE_ERROR => 'error',
|
|
self::TYPE_INFO => 'info',
|
|
self::TYPE_WARNING => 'warning',
|
|
];
|
|
|
|
return $type_map[$this->type_id] ?? 'info';
|
|
}
|
|
} |