企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
~~~ -- shop_user -- DROP TABLE IF EXISTS shop_user; CREATE TABLE IF NOT EXISTS shop_user( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户主键ID', username VARCHAR(45) NOT NULL DEFAULT '' COMMENT '用户名', password CHAR(32) NOT NULL DEFAULT '' COMMENT '用户密码', email VARCHAR(100) NOT NULL DEFAULT '' COMMENT '邮箱', openid CHAR(32) NOT NULL DEFAULT '' COMMENT 'QQopenID', is_admin ENUM('0','1') NOT NULL DEFAULT '0' COMMENT '1为管理员,默认0不是管理员', last_login_ip BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '上次登陆IP', last_login_time INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '上次登陆的时间', register_time INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户注册时间', update_time TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP DEFAULT 0 COMMENT '数据更新时间', UNIQUE shop_user_username_password(username,password), UNIQUE shop_user_email_password(email,password), PRIMARY KEY(id) )ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8; insert into shop_user(username,password,email) VALUES('aaa','bbb','aa@qq.com'); UPDATE shop_user set is_admin='1' where id = 10000; $is_admin = $this->where('') ~~~