重构账单查询sql
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 2s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 2s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
This commit is contained in:
44
Entity/AGENTS.md
Normal file
44
Entity/AGENTS.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# ENTITY LAYER KNOWLEDGE BASE
|
||||
|
||||
**Generated:** 2026-01-28
|
||||
**Parent:** EmailBill/AGENTS.md
|
||||
|
||||
## OVERVIEW
|
||||
Database entities using FreeSql ORM with BaseEntity inheritance pattern.
|
||||
|
||||
## STRUCTURE
|
||||
```
|
||||
Entity/
|
||||
├── BaseEntity.cs # Base entity with Snowflake ID
|
||||
├── GlobalUsings.cs # Common imports
|
||||
├── BudgetRecord.cs # Budget tracking entity
|
||||
├── TransactionRecord.cs # Transaction entity
|
||||
├── EmailMessage.cs # Email processing entity
|
||||
└── MessageRecord.cs # Message entity
|
||||
```
|
||||
|
||||
## WHERE TO LOOK
|
||||
| Task | Location | Notes |
|
||||
|------|----------|-------|
|
||||
| Base entity pattern | BaseEntity.cs | Snowflake ID, audit fields |
|
||||
| Budget entities | BudgetRecord.cs, BudgetArchive.cs | Budget tracking |
|
||||
| Transaction entities | TransactionRecord.cs, TransactionPeriodic.cs | Financial transactions |
|
||||
| Email entities | EmailMessage.cs, MessageRecord.cs | Email processing |
|
||||
|
||||
## CONVENTIONS
|
||||
- Inherit from BaseEntity for all entities
|
||||
- Use [Column] attributes for FreeSql mapping
|
||||
- Snowflake IDs via YitIdHelper.NextId()
|
||||
- Chinese comments for business logic
|
||||
- XML docs for public APIs
|
||||
|
||||
## ANTI-PATTERNS (THIS LAYER)
|
||||
- Never use DateTime.Now (use IDateTimeProvider)
|
||||
- Don't skip BaseEntity inheritance
|
||||
- Avoid complex business logic in entities
|
||||
- No database queries in entity classes
|
||||
|
||||
## UNIQUE STYLES
|
||||
- Fluent Chinese naming for business concepts
|
||||
- Audit fields (CreateTime, UpdateTime) automatic
|
||||
- Soft delete patterns via UpdateTime nullability
|
||||
Reference in New Issue
Block a user