mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 12:09:35 +01:00
refactor: restructure repository with separate backend and frontend directories
- Move Java backend to backend/ directory - Create frontend/ directory for TypeScript TUI and future WebUI - Update .gitignore for Node.js and worktrees - Update README.md with new repository structure - Copy documentation to backend/
This commit is contained in:
parent
ec9114aa0a
commit
c2c48a03e8
141 changed files with 734 additions and 9 deletions
80
backend/docs/mvp/ddd/09-filiales-bc.md
Normal file
80
backend/docs/mvp/ddd/09-filiales-bc.md
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# Filiales BC - Detailliertes Domain Model
|
||||
|
||||
**Bounded Context:** Filiales
|
||||
**Domain Type:** CORE
|
||||
**Verantwortung:** Mehrfilialen-Management, Interfilial-Transfers, zentrale Produktion
|
||||
|
||||
## Aggregates
|
||||
|
||||
### Branch (Aggregate Root)
|
||||
|
||||
```
|
||||
Branch
|
||||
├── BranchId
|
||||
├── BranchName
|
||||
├── BranchType (PRODUCTION_AND_SALES | SALES_ONLY | PRODUCTION_ONLY)
|
||||
├── Address
|
||||
├── OpeningHours
|
||||
├── Status (ACTIVE | INACTIVE | CLOSED)
|
||||
├── Manager (UserId)
|
||||
├── ContactInfo
|
||||
├── Capabilities
|
||||
│ ├── CanProduce (boolean)
|
||||
│ ├── CanSell (boolean)
|
||||
│ └── CanReceiveGoods (boolean)
|
||||
└── AssignedEmployees[] (UserId)
|
||||
|
||||
Invariants:
|
||||
- BranchType must match Capabilities
|
||||
- Manager must be in AssignedEmployees
|
||||
- Cannot close with pending production orders
|
||||
```
|
||||
|
||||
### InterBranchTransfer (Aggregate Root)
|
||||
|
||||
```
|
||||
InterBranchTransfer
|
||||
├── TransferId
|
||||
├── FromBranch (BranchId)
|
||||
├── ToBranch (BranchId)
|
||||
├── TransferDate
|
||||
├── RequestedBy (UserId)
|
||||
├── Status (REQUESTED | APPROVED | IN_TRANSIT | RECEIVED | CANCELLED)
|
||||
├── Items[] (Entity)
|
||||
│ ├── ArticleId
|
||||
│ ├── BatchId - CRITICAL for traceability!
|
||||
│ ├── Quantity
|
||||
│ ├── ExpiryDate
|
||||
│ └── ReceivedQuantity
|
||||
├── ShippedAt
|
||||
├── ReceivedAt
|
||||
└── TransportDocumentId
|
||||
|
||||
Invariants:
|
||||
- FromBranch != ToBranch
|
||||
- Status: REQUESTED → APPROVED → IN_TRANSIT → RECEIVED
|
||||
- ShippedAt < ReceivedAt
|
||||
- Triggers two StockMovements (out + in)
|
||||
```
|
||||
|
||||
### DistributionPlan (Aggregate Root)
|
||||
|
||||
```
|
||||
DistributionPlan
|
||||
├── DistributionPlanId
|
||||
├── ProductionBatchId - From Production BC
|
||||
├── ProducingBranch (BranchId)
|
||||
├── PlannedFor (Date)
|
||||
├── Status (PLANNED | IN_DISTRIBUTION | COMPLETED)
|
||||
├── Distributions[] (Entity)
|
||||
│ ├── TargetBranch (BranchId)
|
||||
│ ├── AllocatedQuantity
|
||||
│ ├── TransferId - Link to InterBranchTransfer
|
||||
│ └── DeliveryStatus (PENDING | SHIPPED | DELIVERED)
|
||||
├── TotalQuantityProduced
|
||||
└── RemainingAtCentral
|
||||
|
||||
Invariants:
|
||||
- SUM(AllocatedQuantity) + RemainingAtCentral = TotalQuantityProduced
|
||||
- ProducingBranch must be PRODUCTION_ONLY or PRODUCTION_AND_SALES
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue