Moved to Tongo wrapper
This commit is contained in:
@ -1,20 +1,33 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.nefrace.ru/nefrace/tongo"
|
||||
)
|
||||
|
||||
type Chat struct {
|
||||
Id int64
|
||||
Title string
|
||||
TopicId int64 `bson:"topic_id"`
|
||||
tongo.Item `bson:",inline"`
|
||||
ChatId int64
|
||||
Title string
|
||||
TopicId int64 `bson:"topic_id"`
|
||||
}
|
||||
|
||||
func (Chat) Coll() string { return "chats" }
|
||||
|
||||
type User struct {
|
||||
Id int64
|
||||
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"`
|
||||
IsBanned bool `bson:"is_banned"`
|
||||
DateJoined int64 `bson:"date_joined"`
|
||||
JoinedMessage int `bson:"joined_message"`
|
||||
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"`
|
||||
IsBanned bool `bson:"is_banned"`
|
||||
DateJoined time.Time `bson:"date_joined"`
|
||||
JoinedMessage int `bson:"joined_message"`
|
||||
LastNotification time.Time `bson:"last_notification"`
|
||||
}
|
||||
|
||||
func (User) Coll() string { return "users" }
|
||||
|
Reference in New Issue
Block a user