feat: init

This commit is contained in:
Anatoly Antonov 2025-03-26 15:07:12 +03:00 committed by Anatoliy Antonov
parent 7688020b52
commit 6302dd62d6
33 changed files with 6027 additions and 0 deletions

View file

@ -0,0 +1,22 @@
package repository
import (
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
func UUIDToPg(in uuid.UUID) pgtype.UUID {
if in == uuid.Nil {
return pgtype.UUID{}
}
return pgtype.UUID{Bytes: in, Valid: true}
}
func PGToUUID(in pgtype.UUID) uuid.UUID {
if !in.Valid {
return uuid.Nil
}
return in.Bytes
}