Files
Nexus-api/db/schema.sql

26 lines
937 B
MySQL
Raw Normal View History

drop table if exists `goal`;
2025-10-01 09:44:35 +08:00
CREATE TABLE if not exists `goal`
2025-10-01 09:44:35 +08:00
(
id INT unsigned auto_increment PRIMARY KEY,
2025-10-10 11:41:50 +08:00
status enum ('DOING', 'DONE', 'CANCEL') default 'DOING' not null,
create_time DATETIME NULL,
update_time DATETIME NULL,
2025-10-10 14:49:34 +08:00
type enum ('GOAL', 'TASK', 'HABIT') default 'TASK' NOT NULL,
2025-10-10 11:41:50 +08:00
name varchar(100) NOT NULL,
tag varchar(100) NULL,
detail varchar(100) NULL
2025-09-29 19:50:02 +08:00
)
2025-10-10 14:49:34 +08:00
COMMENT ='目标管理表';
drop table if exists `habit_record`;
create table habit_record
(
id int unsigned auto_increment
primary key,
create_time datetime null,
update_time datetime null,
goal_id int unsigned not null
)
comment '习惯记录表';