<?php

/**
 * 获取日常信息
 */

namespace Game\Controller\Task;

use Framework\Define\ErrorDefine;
use Framework\MVC\ControllerBase;
use Framework\MVC\ModelManager;
use Game\Constant\ModelTypeDefine;
use Game\Model\Task\ActiveModel;
use Game\Protobuf\CGDailyInfo;

class CG_DailyInfo extends ControllerBase
{
    public function __construct()
    {
        $this->message = new CGDailyInfo();
    }

    public function run(): int
    {
        /**
         * @var ActiveModel $activeModel
         */
        $activeModel = ModelManager::getInstance()->getModel(ModelTypeDefine::TASK_ACTIVE);
        $activeModel->sendActiveMessage();
        return ErrorDefine::SUCCESS;
    }
}
