feat: 实现TCP Server

This commit is contained in:
zimoyin
2026-03-02 21:59:43 +08:00
parent 043306819b
commit a79dfae57d
144 changed files with 15785 additions and 140 deletions
+50
View File
@@ -0,0 +1,50 @@
<?php
namespace app\repository\bean;
class User
{
/**
* @var int auto id
*/
public int $user_id {
get => $this->user_id;
}
/**
* @var string user name
*/
public string $name {
get => $this->name;
}
/**
* @var int role id
*/
public int $roleId {
get => $this->role->value;
}
public UserRole $role{
get => $this->role;
}
/**
* @var int department id
*/
public int $departmentId {
get => $this->departmentId;
}
/**
* @var string 人员卡编码
*/
public string $rfidCode {
get => $this->rfidCode;
}
public function __construct(int $user_id, string $name, int $roleId, int $departmentId, string $rfid)
{
$this->user_id = $user_id;
$this->name = $name;
$this->role = UserRole::from($roleId);
$this->departmentId = $departmentId;
$this->rfidCode = $rfid;
}
}