33 lines
609 B
PHP
33 lines
609 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Entities\UserEntity;
|
|
|
|
class UserModel extends CommonModel
|
|
{
|
|
const TABLE = "user";
|
|
const PK = "uid";
|
|
const TITLE = "name";
|
|
protected $table = self::TABLE;
|
|
protected $primaryKey = self::PK;
|
|
protected $returnType = UserEntity::class;
|
|
protected array $nullableFields = [
|
|
'mobile',
|
|
];
|
|
protected $allowedFields = [
|
|
"uid",
|
|
"id",
|
|
"passwd",
|
|
"name",
|
|
"email",
|
|
"mobile",
|
|
"role",
|
|
"status",
|
|
];
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
}
|