feat(zy): 添加俱乐部功能和用户消息功能

- 新增俱乐部相关接口和功能,包括创建俱乐部、申请加入俱乐部、邀请加入俱乐部等
- 添加用户消息功能,包括发送消息、查看消息等
- 优化了部分代码结构,提高了可维护性
- 更新了文档,添加了新的接口说明
This commit is contained in:
2025-05-04 11:11:44 +08:00
parent 207e6b8a5d
commit 98eda4e5ff
23 changed files with 544 additions and 126 deletions

View File

@@ -34,7 +34,7 @@ class Listen extends Command
->setDescription('Listen to a given queue');
}
public function initialize(Input $input, Output $output)
public function initialize(?Input $input, ?Output $output)
{
$this->listener = new Listener($this->findCommandPath());
$this->listener->setSleep($input->getOption('sleep'));
@@ -45,7 +45,7 @@ class Listen extends Command
});
}
public function execute(Input $input, Output $output)
public function execute(?Input $input, ?Output $output)
{
$delay = $input->getOption('delay');

View File

@@ -23,7 +23,7 @@ class Restart extends Command
$this->setName('queue:restart')->setDescription('Restart queue worker daemons after their current job');
}
public function execute(Input $input, Output $output)
public function execute(?Input $input, ?Output $output)
{
Cache::set('think:queue:restart', time());
$output->writeln("<info>Broadcasting queue restart signal.</info>");

View File

@@ -31,7 +31,7 @@ class Subscribe extends Command
->addOption('option', null, Option::VALUE_IS_ARRAY | Option::VALUE_OPTIONAL, 'the options');
}
public function execute(Input $input, Output $output)
public function execute(?Input $input, ?Output $output)
{
$url = $input->getArgument('url');

View File

@@ -33,7 +33,7 @@ class Work extends Command
*/
protected $worker;
protected function initialize(Input $input, Output $output)
protected function initialize(?Input $input, ?Output $output)
{
$this->worker = new Worker();
}
@@ -57,7 +57,7 @@ class Work extends Command
* @param Output $output
* @return int|null|void
*/
public function execute(Input $input, Output $output)
public function execute(?Input $input, ?Output $output)
{
$queue = $input->getOption('queue');