You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
wastesortingserver/script/db.sql

84 lines
1.6 KiB

# token管理表
create table api_token
(
id int auto_increment primary key,
refresh_token varchar(256),
# Access Token的有效期(1)
expires_in int,
#
end_time datetime,
scope varchar(1024),
session_key varchar(256),
# Access Token
access_token varchar(256),
session_secret varchar(32)
);
#
create table garbage
(
#
name varchar(32) primary key,
#
category int,
#
create_at datetime,
#
update_at datetime
);
#
create table param
(
#
param_key varchar(16) primary key,
#
param_value varchar(128),
#
param_desc varchar(32)
);
#
create table question
(
# id
question_id int auto_increment primary key,
#
question_title varchar(32) not null
);
#
create table answer
(
# id
answer_id int auto_increment primary key,
# id
question_id int,
# ,
answer varchar(32) not null,
#
is_true bool
);
#
create table manager
(
#
manager_name varchar(10) primary key,
#
manager_pwd varchar(32),
#ip
last_ip varchar(15),
#
last_time datetime
);
#
insert manager (manager_name, manager_pwd)
values ('admin', md5('admin'));
#
insert param
values ('api_key', null, null),
('secret_key', null, null);