Script SQL para crear esquema de base de datos financiera (Opción A)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng việc xem xét schema MySQL được đề xuất trong issue và giải quyết các câu hỏi còn bỏ ngỏ về người dùng, lịch sử kiểm toán và quyền sở hữu danh mục. Công việc được xem là hoàn tất khi một tập lệnh SQL tương thích với MySQL định nghĩa các bảng bắt buộc transactions, budgets và savings_goals với các khóa, kiểu dữ liệu và tham chiếu phù hợp, cùng với accounts nếu được chọn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Descripción
Crear un script SQL que defina el esquema inicial de la base de datos para un sistema de finanzas personales. Este sistema permitirá registrar transacciones, presupuestos, metas de ahorro y (opcionalmente) usuarios y cuentas. El esquema debe ser compatible con MySQL y cubrir el MVP de la aplicación.
Tablas requeridas:
transactions: registro de ingresos/gastos, categorías y descripción.budgets: presupuestos por categoría y periodo.savings_goals: metas de ahorro con estado.- (Opcional:
accountspara soportar varias cuentas o wallets)
Debe incluir claves primarias, tipos de datos adecuados y referencias entre tablas donde aplique.
Why
- Permite que el backend almacene y consulte los datos financieros de forma estructurada.
- Facilita la generación de reportes “fin de mes”, seguimiento de objetivos y visualización de gastos/ingresos.
- Es fundamental para el funcionamiento de toda la app y para poder avanzar hacia la integración con frontend y generación de reportes.
Possible Implementation & Open Questions
Script SQL sugerido:
CREATE TABLE accounts (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
currency VARCHAR(10) DEFAULT 'MXN',
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE transactions (
id INT AUTO_INCREMENT PRIMARY KEY,
account_id INT DEFAULT NULL,
type ENUM('income','expense') NOT NULL,
amount DECIMAL(12,2) NOT NULL,
category VARCHAR(100),
description TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(account_id) REFERENCES accounts(id) ON DELETE SET NULL
);
CREATE TABLE budgets (
id INT AUTO_INCREMENT PRIMARY KEY,
account_id INT DEFAULT NULL,
category VARCHAR(100) NOT NULL,
limit_amount DECIMAL(12,2) NOT NULL,
period ENUM('monthly','weekly','yearly') NOT NULL DEFAULT 'monthly',
start_date DATE DEFAULT NULL,
end_date DATE DEFAULT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(account_id) REFERENCES accounts(id) ON DELETE SET NULL
);
CREATE TABLE savings_goals (
id INT AUTO_INCREMENT PRIMARY KEY,
account_id INT DEFAULT NULL,
name VARCHAR(100) NOT NULL,
target_amount DECIMAL(12,2) NOT NULL,
saved_amount DECIMAL(12,2) DEFAULT 0.0,
icon VARCHAR(50),
target_date DATE DEFAULT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(account_id) REFERENCES accounts(id) ON DELETE SET NULL
);
Preguntas abiertas:
- ¿Es necesario soportar múltiples usuarios o es solo para uso personal? (si sí, agregar tabla users y relación con cuentas)
- ¿Se requiere historial de modificaciones (audit trail)?
- ¿Se usarán categorías predefinidas o personalizables?
Is this something you're interested in working on?
- YES
- NO
- Ngôn ngữ chính
- Python
- Star
- 284k
- Fork
- 36.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của practical-tutorials/project-based-learning
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
practical-tutorials/project-based-learning#888 · 3 bình luận ·
-
Broken Link: Erlang -> "Making a Chat App with Erlang, Rebar, Cowboy and Bullet" leads to 404 error Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
practical-tutorials/project-based-learning#840 · 2 bình luận ·
-
BOMOYI Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
practical-tutorials/project-based-learning#937 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
🔗 Link rot report Đang mởlink-rot
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
practical-tutorials/project-based-learning#899 · 1 bình luận ·
Tất cả issue của practical-tutorials/project-based-learning
Issue tương tự
-
agent-ready documentation needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Add https://search.jeremyh.xyz/ Đang mởinstance instance add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
searxng/searx-instances#939 · 1 bình luận ·
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100