add: 用户鉴权和查询所有用户接口
This commit is contained in:
commit
861a689759
10 files changed
+349
No files matched your search
@@ -0,0 +1,9 @@
|
||||
-- insert normal user
|
||||
insert into user(id, name, passwd, create_time, update_time)
|
||||
values
|
||||
("01", "XiaoAi", "abcd", "2026-01-01", "2026-01-01"),
|
||||
("02", "XiaoMing", "abce", "2026-01-02", "2026-01-02"),
|
||||
("03", "CancerAi", "abcf", "2026-01-02", "2026-01-02");
|
||||
|
||||
-- insert admin user
|
||||
insert into admin(name, passwd) values ("admin", "admin");
|
||||
@@ -0,0 +1,16 @@
|
||||
drop table if exists user;
|
||||
drop table if exists admin;
|
||||
|
||||
create table user(
|
||||
id varchar(100) primary key not null,
|
||||
name varchar(50) not null,
|
||||
passwd varchar(120),
|
||||
create_time datetime not null,
|
||||
update_time datetime
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; -- 大小写敏感
|
||||
|
||||
create table admin(
|
||||
id integer primary key auto_increment,
|
||||
name varchar(50) not null,
|
||||
passwd varchar(120) not null
|
||||
);
|
||||
Reference in new issue
Block a user