CREATE TABLE todos
(
namespace VARCHAR(36) NOT NULL,
id SERIAL NOT NULL,
content TEXT NOT NULL,
status VARCHAR(32) NOT NULl,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
PRIMARY KEY (namespace, id)
);
t-ns
short for todo namespace
t-ns: {NS}
get a list of todos
query
?status=todo
body
[
{
"id": 1,
"namespace": "default",
"content": "first thing",
"status": "todo",
"create_at": 1647151812778
}
]
create a todo
body
{
"content": "second thing"
}
update todo, available status:
- todo
- done
- archive
{
"content": "updated thing",
"status": "done"
}
delete a archived todo
shared by backend and frontend
- client.rs
- model.rs
- handlers/
- todo_handler.rs
- domains/
- todo_domain.rs
- todo_repository.rs
- infra/
- utils.rs
- config.rs
- db.rs
- components/
- hooks.rs
- icons.rs
- states.rs