HEX
Server: LiteSpeed
System: Linux premium260.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: aliazzsr (627)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //home/aliazzsr/api.crm.vqode.com/models/core/Priority.php
<?php
namespace app\models\core;

use app\components\BaseModel;
use app\components\validators\ColorValidator;

/**
 * Class Priority
 * @package app\models\core
 * @property string $name
 * @property string $color
 * @property string $description
 */
class Priority extends BaseModel
{
    public static function tableName()
    {
        return 'priority';
    }

    public function rules()
    {
        return [
            [['name', 'color', 'description'], 'trim'],
            [['name', 'color'], 'required'],
            [['color'], ColorValidator::className()],
        ];
    }
}
/**
 * @SWG\Definition(
 *     definition="Priority",
 *     type="object",
 *     description="Priority model",
 *     allOf={
 *       @SWG\Schema(
 *           @SWG\Property(property="id", type="integer", example=2, description="Unique identifier"),
 *           @SWG\Property(property="name", type="string", example="High Priority", description="Priority name"),
 *           @SWG\Property(property="color", type="string", example="97B3CE", description="Color, 3 or 6 hex characters"),
 *           @SWG\Property(property="description", type="string", description="Priority description"),
 *       )
 *     }
 * )
 */