package health

import (
	"ymhut-box/server/unified-management/internal/config"
	"ymhut-box/server/unified-management/internal/db"
)

func Snapshot(cfg *config.Config, store *db.Store) map[string]any {
	return map[string]any{
		"ok":      true,
		"version": config.Version,
		"service": map[string]any{
			"name":    "YMhut Unified Management",
			"baseUrl": cfg.BaseURL,
		},
		"database": store.Status(),
		"preflight": config.Preflight(cfg),
	}
}
