Mike Schwörer 1c374c6571
Some checks failed
Build Docker and Deploy / Build Docker Container (push) Has been cancelled
Build Docker and Deploy / Run Unit-Tests (push) Has been cancelled
Build Docker and Deploy / Deploy to Server (push) Has been cancelled
Update goext|gognecht dependencies to new module-root 'git.blackforestbytes'
2025-05-03 16:53:27 +02:00

26 lines
330 B
Go

package db
import (
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
"time"
)
func bool2DB(b bool) int {
if b {
return 1
} else {
return 0
}
}
func time2DB(t time.Time) int64 {
return t.UnixMilli()
}
func time2DBOpt(t *time.Time) *int64 {
if t == nil {
return nil
}
return langext.Ptr(t.UnixMilli())
}