From bb970cb116ca539254ebcc5414ffc80feb2097d9 Mon Sep 17 00:00:00 2001 From: jud1thdev <8w8u8@naver.com> Date: Sun, 16 Nov 2025 22:13:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?add:=20=ED=95=99=EC=8A=B5=EC=B9=B4=EB=93=9C?= =?UTF-8?q?=20=ED=85=8C=EC=9D=B4=EB=B8=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ database/schema.sql | 16 ++++++++++++++++ tools/normalize_learning_cards.py | 1 + 3 files changed, 20 insertions(+) create mode 100644 tools/normalize_learning_cards.py diff --git a/.gitignore b/.gitignore index fd3d377..d624756 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ build/ dist/ *.egg-info/ +# 학습 카드 로컬 JSON (민감/콘텐츠 자산이므로 Git에 올리지 않음) +database/learning_cards.json + diff --git a/database/schema.sql b/database/schema.sql index d32fa75..9cb51cf 100644 --- a/database/schema.sql +++ b/database/schema.sql @@ -61,3 +61,19 @@ CREATE TABLE IF NOT EXISTS reports ( ); CREATE INDEX IF NOT EXISTS idx_reports_symbol ON reports(symbol); CREATE INDEX IF NOT EXISTS idx_reports_created_at ON reports(created_at DESC); + + +-- 학습 카드 테이블 +CREATE TABLE IF NOT EXISTS learning_cards ( + id SERIAL PRIMARY KEY, + title TEXT NOT NULL, -- 카드 제목 + description TEXT NOT NULL, -- 한 줄 설명 + contents TEXT[] NOT NULL, -- 본문 내용 + category TEXT NOT NULL, -- 예: 리스크관리, 기술지표, 투자심리 등 + level INTEGER NOT NULL CHECK (level BETWEEN 1 AND 5), -- 난이도 1~5 + keywords TEXT[] NOT NULL, -- 태깅/추천용 키워드 + image_urls TEXT[] NOT NULL, -- 학습 카드 이미지 S3 URL 리스트 + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + updated_at TIMESTAMP NOT NULL DEFAULT NOW() +); + diff --git a/tools/normalize_learning_cards.py b/tools/normalize_learning_cards.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tools/normalize_learning_cards.py @@ -0,0 +1 @@ + From 5c1ca79dc50c6a86cec6bc68466eb8568b5d6ccd Mon Sep 17 00:00:00 2001 From: jud1thdev <8w8u8@naver.com> Date: Sun, 16 Nov 2025 22:15:55 +0900 Subject: [PATCH 2/2] =?UTF-8?q?remove:=20=EC=95=88=20=EC=93=B0=EB=8A=94=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC(=EC=B9=B4=EB=93=9C=20=EC=A0=95=EA=B7=9C?= =?UTF-8?q?=ED=99=94)=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- tools/normalize_learning_cards.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 tools/normalize_learning_cards.py diff --git a/.gitignore b/.gitignore index d624756..cb3334f 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,6 @@ build/ dist/ *.egg-info/ -# 학습 카드 로컬 JSON (민감/콘텐츠 자산이므로 Git에 올리지 않음) +# 학습 카드 로컬 JSON database/learning_cards.json diff --git a/tools/normalize_learning_cards.py b/tools/normalize_learning_cards.py deleted file mode 100644 index 8b13789..0000000 --- a/tools/normalize_learning_cards.py +++ /dev/null @@ -1 +0,0 @@ -