Files
2026-03-08 22:58:56 +08:00

50 lines
975 B
PHP

<?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;
}
}