Fix Item.DeletedAt missing
This commit is contained in:
parent
c184d18431
commit
d3f5fce46d
2
go.mod
2
go.mod
|
@ -1,3 +1,5 @@
|
||||||
module github.com/ekzyis/snappy
|
module github.com/ekzyis/snappy
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
|
require gopkg.in/guregu/null.v4 v4.0.0 // indirect
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -0,0 +1,2 @@
|
||||||
|
gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg=
|
||||||
|
gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI=
|
3
items.go
3
items.go
|
@ -4,6 +4,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gopkg.in/guregu/null.v4"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Item struct {
|
type Item struct {
|
||||||
|
@ -14,6 +16,7 @@ type Item struct {
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
Sats int `json:"sats"`
|
Sats int `json:"sats"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
|
DeletedAt null.Time `json:"deletedAt"`
|
||||||
Comments []Comment `json:"comments"`
|
Comments []Comment `json:"comments"`
|
||||||
NComments int `json:"ncomments"`
|
NComments int `json:"ncomments"`
|
||||||
User User `json:"user"`
|
User User `json:"user"`
|
||||||
|
|
Loading…
Reference in New Issue