add: 习惯curd

This commit is contained in:
kkunkka
2025-10-10 14:49:34 +08:00
parent 79c0e37b87
commit affb754ae4
8 changed files with 100 additions and 2 deletions

View File

@@ -6,9 +6,21 @@ CREATE TABLE if not exists `goal`
status enum ('DOING', 'DONE', 'CANCEL') default 'DOING' not null,
create_time DATETIME NULL,
update_time DATETIME NULL,
type enum('GOAL', 'TASK', 'HABIT') default 'TASK' NOT NULL ,
type enum ('GOAL', 'TASK', 'HABIT') default 'TASK' NOT NULL,
name varchar(100) NOT NULL,
tag varchar(100) NULL,
detail varchar(100) NULL
)
COMMENT ='目标管理表';
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 '习惯记录表';