Files
2025-07-27 12:22:34 +08:00

39 lines
856 B
PHP

<?php
class PinganUsersEntity
{
public $id;
public $mobile;
public $username;
public $status;
public $cityId;
protected $ci;
public function __construct()
{
$this->ci = &get_instance();
$this->ci->load->model('area_model');
}
/**
* @return string
*/
public function getMobileAsterisk()
{
return is_numeric($this->mobile) ? mobile_asterisk($this->mobile) : $this->mobile;
}
/**
* @return string
*/
public function getCityName()
{
$cityName = '全国';
if ($this->cityId) {
$city = $this->ci->area_model->get(['city_id' => $this->cityId]);
$cityName = "{$city['province_name']}-{$city['city_name']}"; //城市名称
}
return $cityName;
}
}