feat: 예상 수입 월별 저장 + 계좌 순서변경 API
CI / build (push) Failing after 12m2s

- 예상 수입: budget_income(연·월별) 로 변경, GET/PUT 에 year·month
- 계좌: wallet.sort_order + reorder 엔드포인트, 생성 시 맨 뒤 배치

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-01 22:54:23 +09:00
parent cac9919cc5
commit f5e9b78a14
11 changed files with 93 additions and 24 deletions
+6 -3
View File
@@ -27,6 +27,7 @@ CREATE TABLE IF NOT EXISTS wallet (
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS opening_balance BIGINT NOT NULL DEFAULT 0;
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS opening_date DATE NULL;
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS current_value BIGINT NULL;
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS sort_order INT NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS account_entry (
id BIGINT NOT NULL AUTO_INCREMENT,
@@ -123,12 +124,14 @@ CREATE TABLE IF NOT EXISTS account_entry_tag (
KEY idx_aet_tag (tag_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 사용자별 가계부 설정 (예: 월 예상 수입)
CREATE TABLE IF NOT EXISTS account_setting (
-- 사용자별 월 예상 수입 (월별 저장)
CREATE TABLE IF NOT EXISTS budget_income (
member_id BIGINT NOT NULL COMMENT '소유자 member.id',
`year` INT NOT NULL,
`month` INT NOT NULL,
expected_income BIGINT NULL COMMENT '월 예상 수입',
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (member_id)
PRIMARY KEY (member_id, `year`, `month`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 투자 보유 종목 (INVEST 지갑별 · 사용자별)