feat: implement wiki and submission management services with corresponding database schema and API endpoints
Build and Release / release (push) Successful in 2m3s

This commit is contained in:
2026-05-27 18:00:30 +07:00
parent 79cf5caa0b
commit e35f67e26b
16 changed files with 462 additions and 265 deletions
+1
View File
@@ -3,6 +3,7 @@ CREATE TABLE IF NOT EXISTS wiki_content (
wiki_id UUID NOT NULL REFERENCES wikis(id) ON DELETE CASCADE,
title TEXT NOT NULL,
content TEXT,
preview TEXT,
is_deleted BOOLEAN NOT NULL DEFAULT false,
created_at TIMESTAMPTZ DEFAULT now()
);
+2 -2
View File
@@ -95,9 +95,9 @@ SELECT * FROM wikis WHERE slug = ANY($1::text[]) AND is_deleted = false;
-- name: CreateWikiContent :one
INSERT INTO wiki_content (
id, wiki_id, title, content
id, wiki_id, title, content, preview
) VALUES (
COALESCE(sqlc.narg('id')::uuid, uuidv7()), $1, $2, $3
COALESCE(sqlc.narg('id')::uuid, uuidv7()), $1, $2, $3, $4
)
RETURNING *;
+1
View File
@@ -112,6 +112,7 @@ CREATE TABLE IF NOT EXISTS wiki_content (
wiki_id UUID NOT NULL REFERENCES wikis(id) ON DELETE CASCADE,
title TEXT NOT NULL,
content TEXT,
preview TEXT,
is_deleted BOOLEAN NOT NULL DEFAULT false,
created_at TIMESTAMPTZ DEFAULT now()
);