You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
1.7 KiB
96 lines
1.7 KiB
<?php
|
|
|
|
//管理员实体
|
|
class Manager
|
|
{
|
|
private $manager_name;
|
|
private $manager_pwd;
|
|
private $last_ip;
|
|
private $last_time;
|
|
|
|
/**
|
|
* Manager constructor.
|
|
* @param $manager_name
|
|
* @param $manager_pwd
|
|
* @param $last_ip
|
|
* @param $last_time
|
|
*/
|
|
public function __construct($manager_name, $manager_pwd, $last_ip, $last_time)
|
|
{
|
|
$this->manager_name = $manager_name;
|
|
$this->manager_pwd = $manager_pwd;
|
|
$this->last_ip = $last_ip;
|
|
$this->last_time = $last_time;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getManagerName()
|
|
{
|
|
return $this->manager_name;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getManagerPwd()
|
|
{
|
|
return $this->manager_pwd;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getLastIp()
|
|
{
|
|
return $this->last_ip;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getLastTime()
|
|
{
|
|
return $this->last_time;
|
|
}
|
|
|
|
public function loginToken()
|
|
{
|
|
return md5($this->last_ip . $this->last_time);
|
|
}
|
|
|
|
/**
|
|
* @param mixed $manager_name
|
|
*/
|
|
public function setManagerName($manager_name): void
|
|
{
|
|
$this->manager_name = $manager_name;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $manager_pwd
|
|
*/
|
|
public function setManagerPwd($manager_pwd): void
|
|
{
|
|
$this->manager_pwd = $manager_pwd;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $last_ip
|
|
*/
|
|
public function setLastIp($last_ip): void
|
|
{
|
|
$this->last_ip = $last_ip;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $last_time
|
|
*/
|
|
public function setLastTime($last_time): void
|
|
{
|
|
$this->last_time = $last_time;
|
|
}
|
|
|
|
|
|
} |