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

61 lines
1.2 KiB

5 years ago
# 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(256),
session_key varchar(256),
# 要获取的Access Token;
access_token varchar(1024),
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(16),
# 参数描述
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
);