Mike Schwörer 1d2f4f70c8
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:59:57 +02:00

26 lines
336 B
Go

package requests
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())
}