<?php
namespace app\index\model;
use think\Model;

// 引入框架内置类
use think\facade\Db;
use think\facade\Event;
use think\facade\Session;
use think\facade\Request;

class User extends Model{
	
    // 定义时间戳字段名
    protected $createTime = 'time';

	//前端录入信息
	public static function insert(){
		$tdata=Request::param();
		$tdata['password']=pass_encrypt($tdata['password']);
		$tdata['time']=time();
		$id=Db::name('user')->strict(false)->insertGetId($tdata);
		return $id;
	}

}