feat(db): add schema, sqlc queries and generated code

This commit is contained in:
kk10
2026-10-04 21:25:07 +03:00
parent 492e0be15c
commit e1f2cb01e0
14 changed files with 744 additions and 23 deletions
+31
View File
@@ -0,0 +1,31 @@
version: "2"
sql:
- engine: "postgresql"
queries: "db/queries"
schema: "db/migrations"
gen:
go:
package: "db"
out: "internal/db"
sql_package: "pgx/v5"
emit_interface: true
emit_empty_slices: true
emit_pointers_for_null_types: true
overrides:
- db_type: "uuid"
go_type: "github.com/google/uuid.UUID"
- db_type: "uuid"
nullable: true
go_type:
import: "github.com/google/uuid"
type: "UUID"
pointer: true
- db_type: "timestamptz"
go_type: "time.Time"
- db_type: "timestamptz"
nullable: true
go_type:
import: "time"
type: "Time"
pointer: true