Refactored the application structure to better separate concerns between files and packages
Some checks failed
ci/woodpecker/push/build-image Pipeline failed

This commit is contained in:
2026-03-20 09:44:53 -05:00
parent 8deb4fd12e
commit bb18bcfb15
41 changed files with 1445 additions and 1086 deletions

View File

@@ -0,0 +1,39 @@
// scan_helpers.go provides shared sql.Null* conversion helpers.
// Layer: adapters/outbound/postgres helper utilities.
package postgres
import (
"database/sql"
"time"
)
func stringValue(v sql.NullString) string {
if !v.Valid {
return ""
}
return v.String
}
func boolPtr(v sql.NullBool) *bool {
if !v.Valid {
return nil
}
b := v.Bool
return &b
}
func float64Ptr(v sql.NullFloat64) *float64 {
if !v.Valid {
return nil
}
f := v.Float64
return &f
}
func timePtr(v sql.NullTime) *time.Time {
if !v.Valid {
return nil
}
t := v.Time.UTC()
return &t
}