29 lines
504 B
PHP
29 lines
504 B
PHP
<?php
|
|
declare (strict_types = 1);
|
|
|
|
namespace app\model;
|
|
|
|
use think\Model;
|
|
|
|
/**
|
|
* 用户模型
|
|
*/
|
|
class User extends Model
|
|
{
|
|
// 设置数据库连接
|
|
protected $connection = 'sqlite';
|
|
|
|
// 设置表名
|
|
protected $name = 'users';
|
|
|
|
// 自动写入时间戳
|
|
protected $autoWriteTimestamp = true;
|
|
|
|
// 定义时间戳字段名
|
|
protected $createTime = 'created_at';
|
|
protected $updateTime = false;
|
|
|
|
// 隐藏字段
|
|
protected $hidden = ['password'];
|
|
}
|