go-dette/types.go

34 lines
510 B
Go
Raw Normal View History

2023-01-20 16:32:21 +03:00
package main
2023-01-24 00:37:27 +03:00
import (
"time"
"git.nefrace.ru/nefrace/tongo"
)
2023-01-20 16:32:21 +03:00
var _ tongo.Collectable = &User{}
type User struct {
tongo.Item `bson:",inline"`
2023-01-24 00:37:27 +03:00
Username string
FirstName string
LastName string
2023-01-24 00:37:27 +03:00
ID int64
KarmaOffset int
LastMessage time.Time
2023-01-20 16:32:21 +03:00
}
func (User) Coll() string { return "users" }
2023-01-24 00:37:27 +03:00
var _ tongo.Collectable = &KarmaShot{}
type KarmaShot struct {
tongo.Item
From tongo.OID
To tongo.OID
Count int
When time.Time
}
func (KarmaShot) Coll() string { return "karma" }