docs: add hierarchical AGENTS.md for subdirectories
This commit is contained in:
parent
e9b7a362e0
commit
405936890c
43
AGENTS.md
Normal file
43
AGENTS.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# AGENTS.md - Fengling.Platform
|
||||||
|
|
||||||
|
**Parent:** `/AGENTS.md`
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Cross-service platform infrastructure — multi-tenant, Identity, authentication.
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
src/Fengling.Platform/
|
||||||
|
├── Fengling.Platform.Domain/
|
||||||
|
│ └── AggregatesModel/
|
||||||
|
│ ├── UserAggregate/ # ApplicationUser
|
||||||
|
│ ├── RoleAggregate/ # ApplicationRole
|
||||||
|
│ └── TenantAggregate/ # Tenant, TenantInfo
|
||||||
|
└── Fengling.Platform.Infrastructure/
|
||||||
|
├── PlatformDbContext.cs # IdentityDbContext
|
||||||
|
├── ITenantStore.cs
|
||||||
|
├── ITenantManager.cs
|
||||||
|
└── Configurations/ # EF Core configs
|
||||||
|
```
|
||||||
|
|
||||||
|
## Where to Look
|
||||||
|
|
||||||
|
| Task | Location |
|
||||||
|
|------|----------|
|
||||||
|
| Tenant mgmt | `Platform.Domain/AggregatesModel/TenantAggregate/` |
|
||||||
|
| User/Role | `Platform.Domain/AggregatesModel/*Aggregate/` |
|
||||||
|
| DB Context | `Platform.Infrastructure/PlatformDbContext.cs` |
|
||||||
|
| Auth config | `Platform.Infrastructure/` |
|
||||||
|
|
||||||
|
## Conventions
|
||||||
|
|
||||||
|
- **Pattern**: Manager + Store (ASP.NET Core Identity style)
|
||||||
|
- **Entities**: 贫血模型 for Tenant, 充血模型 for aggregates
|
||||||
|
- **ID type**: `long` for all identities
|
||||||
|
|
||||||
|
## Anti-Patterns
|
||||||
|
|
||||||
|
- **Migration in progress** — Console not yet migrated to Platform
|
||||||
|
- Don't add new entities to Console — use Platform instead
|
||||||
Loading…
Reference in New Issue
Block a user