本月收入
$0
0 筆
本月支出
$0
0 筆
本月結餘
$0
收入 − 支出
固定支出
$0
0 項

本月支出分類

近 6 個月收支趨勢

日期類型分類備註金額
日期類型分類備註金額
收入合計
$0
支出合計
$0
結餘
$0

收入分類

支出分類

日期類型分類備註金額

新增固定支出

名稱
分類
金額
每月幾號

新增工讀生

工讀生名單

尚未新增工讀生

薪資計算

計算結果後可直接轉為支出紀錄
新增工讀生後此處會出現計算卡片

薪資發放紀錄

日期工讀生工時時薪獎金實付薪資備註

新增分類

收入分類

支出分類

Supabase 連線設定

建立資料表 SQL

請在 Supabase SQL Editor 中執行:

-- 收支紀錄
CREATE TABLE IF NOT EXISTS finance_records (
  id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
  type text NOT NULL CHECK (type IN ('income','expense')),
  amount numeric(12,2) NOT NULL,
  category text NOT NULL,
  note text,
  date date NOT NULL,
  is_auto boolean DEFAULT false,
  created_at timestamptz DEFAULT now()
);

-- 分類標籤
CREATE TABLE IF NOT EXISTS finance_categories (
  id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
  type text NOT NULL CHECK (type IN ('income','expense')),
  name text NOT NULL,
  color text DEFAULT '#A0622A',
  created_at timestamptz DEFAULT now()
);

-- 固定支出
CREATE TABLE IF NOT EXISTS finance_recurring (
  id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
  name text NOT NULL,
  amount numeric(12,2) NOT NULL,
  category text NOT NULL,
  day_of_month text NOT NULL,
  note text,
  enabled boolean DEFAULT true,
  created_at timestamptz DEFAULT now()
);

ALTER TABLE finance_records ENABLE ROW LEVEL SECURITY;
ALTER TABLE finance_categories ENABLE ROW LEVEL SECURITY;
ALTER TABLE finance_recurring ENABLE ROW LEVEL SECURITY;
CREATE POLICY "allow all" ON finance_records FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY "allow all" ON finance_categories FOR ALL USING (true) WITH CHECK (true);
CREATE POLICY "allow all" ON finance_recurring FOR ALL USING (true) WITH CHECK (true);