|
@@ -2,6 +2,7 @@ package model
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
+ "fmt"
|
|
|
"io"
|
|
|
"log"
|
|
|
"regexp"
|
|
@@ -79,3 +80,12 @@ func (d *DateTime) UnmarshalGQL(v interface{}) error {
|
|
|
|
|
|
return nil
|
|
|
}
|
|
|
+
|
|
|
+func (d *DateTime) Scan(src any) error {
|
|
|
+ if t, ok := src.(int64); ok {
|
|
|
+ *d = DateTime(t)
|
|
|
+ return nil
|
|
|
+ }
|
|
|
+
|
|
|
+ return fmt.Errorf("cannot scan %T into DateTime", src)
|
|
|
+}
|