Fix Item.DeletedAt missing

This commit is contained in:
ekzyis 2024-09-19 02:46:15 +02:00
parent c184d18431
commit d3f5fce46d
3 changed files with 7 additions and 0 deletions

2
go.mod
View File

@ -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
View File

@ -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=

View File

@ -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"`