This commit is contained in:
acx
2024-08-11 09:25:09 +00:00
parent e25c1b5ceb
commit 21a6b91139
13 changed files with 466 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
CREATE TABLE "categories" (
"id" BIGSERIAL PRIMARY KEY,
"uid" BIGINT NOT NULL,
"book_id" BIGINT NOT NULL,
"name" TEXT NOT NULL,
"level" INT NOT NULL DEFAULT 0,
"parent_category_id" BIGINT NOT NULL DEFAULT 0,
@@ -14,6 +15,7 @@ CREATE TABLE "categories" (
CREATE TABLE "tags" (
"id" BIGSERIAL PRIMARY KEY,
"uid" BIGINT NOT NULL,
"book_id" BIGINT NOT NULL,
"name" TEXT NOT NULL,
"level" INT NOT NULL DEFAULT 0,
"parent_tag_id" BIGINT NOT NULL DEFAULT 0,
@@ -66,9 +68,11 @@ CREATE TABLE "accounts" (
CREATE TABLE "amounts" (
"id" BIGSERIAL PRIMARY KEY,
"uid" BIGINT NOT NULL,
"account_id" BIGINT NOT NULL,
"transaction_id" BIGINT NOT NULL,
"value" BIGINT NOT NULL DEFAULT 0,
"expo" BIGINT NOT NULL DEFAULT 5,
"currency" TEXT NOT NULL DEFAULT '',
"is_delete" BOOLEAN NOT NULL DEFAULT FALSE,
"create_at" TIMESTAMP NOT NULL DEFAULT current_timestamp,
"update_at" TIMESTAMP NOT NULL DEFAULT current_timestamp