KickerBot/db/structs.go

36 lines
974 B
Go

package db
import (
"time"
"git.nefrace.ru/nefrace/tongo"
)
type Chat struct {
tongo.Item `bson:",inline"`
ChatId int64 `bson:"chat_id"`
Title string
TopicId int64 `bson:"topic_id"`
Greet string `bson:"greet"`
}
func (Chat) Coll() string { return "chats" }
type User struct {
tongo.Item `bson:",inline"`
UserId int64 `bson:"user_id"`
ChatId int64 `bson:"chat_id"`
Username string `bson:"username"`
FirstName string `bson:"first_name"`
LastName string `bson:"last_name"`
CorrectAnswer int8 `bson:"correct_answer"`
CaptchaMessage int `bson:"captcha_message"`
IsJoined bool `bson:"is_joined"`
DateJoined time.Time `bson:"date_joined"`
JoinedMessage int `bson:"joined_message"`
LastNotification time.Time `bson:"last_notification"`
Warnings int `bson:"warnings"`
}
func (User) Coll() string { return "users" }