730 B
730 B
OVERVIEW
Provides domain entities, DTOs, and ORM mappings for NAM's data model.
STRUCTURE
- dto/req: Request DTOs with validation tags for incoming data.
- dto/res: Response DTOs for outgoing data.
- entity: GORM-based domain entities located in model/entity/.
CONVENTIONS
- UUID primary keys are defined with gorm:"type:uuid;primaryKey" on ID fields.
- DTOs in model/dto/req/ use validation tags (e.g., validate:"required", binding:"required") and JSON tags.
- Response DTOs in model/dto/res/ carry serialized data with appropriate JSON tags.
- Tables names are controlled by a TableName() string method on each entity.
- Entities are in model/entity/ with GORM tags; DTOs reflect input/output shapes for API boundaries.