Added CreatedAt field to URL model
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
package db
|
||||
|
||||
import "github.com/scylladb/gocqlx/v2/table"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/scylladb/gocqlx/v2/table"
|
||||
)
|
||||
|
||||
var UrlTable = table.New(table.Metadata{
|
||||
Name: "fivefeeteleven.urls",
|
||||
Columns: []string{"id", "long_url"},
|
||||
Columns: []string{"id", "long_url", "created_at"},
|
||||
PartKey: []string{"id"},
|
||||
SortKey: []string{},
|
||||
})
|
||||
|
||||
type UrlModel struct {
|
||||
ID string
|
||||
LongUrl string
|
||||
ID string
|
||||
LongUrl string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user