17 lines
262 B
Go
17 lines
262 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type NullValue[T any] struct {
|
|
Value T
|
|
Valid bool // Valid is true if Value is not NULL
|
|
}
|
|
|
|
type NullInt = NullValue[int]
|
|
|
|
type NullString = NullValue[string]
|
|
|
|
type NullBool = NullValue[bool]
|
|
|
|
type NullTime = NullValue[time.Time]
|