- Implement standalone Go backend API server using Gin and pure-Go SQLite (modernc.org/sqlite) - Add 11-table schema DDL migrations (000001_init.up.sql) based on DATA_TABLE.md - Add seed data ingestion tool (cmd/seed) and static TypeScript content exporter (cmd/export-content) - Add configuration loader (internal/config) supporting environment variables and .env files (HOST, PORT, DB_PATH, GIN_MODE, CORS_ALLOW_ORIGINS, AUTO_MIGRATE) - Add lightweight multi-stage Dockerfile and docker-compose.yml with persistent SQLite volume - Add comprehensive architecture specification (ARCHITECTURE.md) and REST API interface specification (API_INTERFACE.md) - Harmonize frontend publications page to consume isHighlight flag from database-synced content
40 lines
1.3 KiB
Go
40 lines
1.3 KiB
Go
package models
|
|
|
|
type StandardDocument struct {
|
|
ID int `json:"id"`
|
|
BodyID int `json:"body_id"`
|
|
WG string `json:"wg"`
|
|
ProjectName string `json:"project_name"`
|
|
Title string `json:"title"`
|
|
DocRef string `json:"doc_ref"`
|
|
Status string `json:"status"`
|
|
PublishedAt *string `json:"published_at,omitempty"`
|
|
}
|
|
|
|
type StandardProjectGroup struct {
|
|
WG string `json:"wg"`
|
|
Name string `json:"name"`
|
|
Documents []StandardDocument `json:"documents"`
|
|
}
|
|
|
|
type StandardsBody struct {
|
|
ID int `json:"id"`
|
|
Org string `json:"org"`
|
|
FullName string `json:"full_name"`
|
|
Scope string `json:"scope"`
|
|
Period string `json:"period"`
|
|
Role *string `json:"role,omitempty"`
|
|
DisplayOrder int `json:"display_order"`
|
|
}
|
|
|
|
type StandardsBodyWithProjects struct {
|
|
ID int `json:"id"`
|
|
Org string `json:"org"`
|
|
FullName string `json:"full_name"`
|
|
Scope string `json:"scope"`
|
|
Period string `json:"period"`
|
|
Role *string `json:"role,omitempty"`
|
|
DisplayOrder int `json:"display_order"`
|
|
Projects []StandardProjectGroup `json:"projects"`
|
|
}
|