MQTT 管理客户端
This commit is contained in:
74
src/biz/AppUserCreateRequest.php
Normal file
74
src/biz/AppUserCreateRequest.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace cn\com\maiyoule\mqttclient\biz;
|
||||
|
||||
use cn\com\maiyoule\mqttclient\IRequest;
|
||||
|
||||
class AppUserCreateRequest extends IRequest
|
||||
{
|
||||
|
||||
public function path(): string
|
||||
{
|
||||
return 'mqtt/user/create';
|
||||
}
|
||||
|
||||
public function body(): array
|
||||
{
|
||||
return [
|
||||
'password' => $this->getPassword(),
|
||||
'fettle' => $this->getFettle(),
|
||||
'role' => $this->getRole(),
|
||||
'biz' => join(',', $this->getBiz())
|
||||
];
|
||||
}
|
||||
|
||||
private array $biz = [];
|
||||
|
||||
public function getBiz(): array
|
||||
{
|
||||
return $this->biz;
|
||||
}
|
||||
|
||||
public function setBiz(array $biz): void
|
||||
{
|
||||
$this->biz = $biz;
|
||||
}
|
||||
|
||||
private string $password = '';
|
||||
private string $fettle = '';
|
||||
private string $role = 'user';
|
||||
|
||||
|
||||
public function getRole(): string
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
|
||||
public function setRole(string $role): void
|
||||
{
|
||||
$this->role = $role;
|
||||
}
|
||||
|
||||
|
||||
public function getPassword(): string
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function setPassword(string $password): void
|
||||
{
|
||||
$this->password = $password;
|
||||
}
|
||||
|
||||
public function getFettle(): string
|
||||
{
|
||||
return $this->fettle;
|
||||
}
|
||||
|
||||
public function setFettle(string $fettle): void
|
||||
{
|
||||
$this->fettle = $fettle;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user