2023-12-24 10:44:20 +00:00
|
|
|
package domain
|
|
|
|
|
2023-12-30 09:10:03 +00:00
|
|
|
import "time"
|
|
|
|
|
2023-12-24 10:44:20 +00:00
|
|
|
type NullValue[T any] struct {
|
2024-02-28 06:59:10 +00:00
|
|
|
V T
|
|
|
|
Valid bool // Valid is true if V is not NULL
|
2023-12-24 10:44:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type NullInt = NullValue[int]
|
|
|
|
|
|
|
|
type NullString = NullValue[string]
|
|
|
|
|
|
|
|
type NullBool = NullValue[bool]
|
2023-12-30 09:10:03 +00:00
|
|
|
|
|
|
|
type NullTime = NullValue[time.Time]
|