Files
plates-server/.cursor/rules/database-module.mdc
2025-08-13 15:17:33 +08:00

21 lines
578 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description:
globs:
alwaysApply: false
---
# 数据库模块 (Database Module)
数据库模块负责配置和管理与MySQL数据库的连接使用Sequelize ORM。
## 主要文件
- 模块定义: [src/database/database.module.ts](mdc:src/database/database.module.ts) - 配置Sequelize连接
## 使用说明
- 该模块通过NestJS的ConfigService从环境变量获取数据库配置
- 支持的环境变量:
- DB_HOST: 数据库主机
- DB_PORT: 数据库端口
- DB_USERNAME: 数据库用户名
- DB_PASSWORD: 数据库密码
- DB_DATABASE: 数据库名称