<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * 用户模型
 */
class UserModel extends Model
{
    // 设置表名
    protected $name = 'user';

    // 设置主键
    protected $pk = 'user_id';

    // 设置自动时间戳
    protected $autoWriteTimestamp = 'int';

    // 设置字段类型
    protected $type = [
        'user_id' => 'int',
        'user_name' => 'string',
        'password' => 'string',
        'user_role' => 'int',
        'merchant_id' => 'int',
        'phone' => 'string',
        'nick_name' => 'string',
        'white_list_ip' => 'string',
        'create_time' => 'int',
        'login_time' => 'int',
        'update_time' => 'int',
    ];
}