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 AdminTopic struct { tongo.Item `bson:",inline"` ChatId int64 `bson:"chat_id"` TopicId int64 `bson:"topic_id"` } func (AdminTopic) Coll() string { return "admin_topics" } type LogChannel struct { tongo.Item `bson:",inline"` ChatId int64 `bson:"chat_id"` } func (LogChannel) Coll() string { return "log_channel" } 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" } type Mute struct { tongo.Item `bson:",inline"` UserId int64 `bson:"user_id"` ChatId int64 `bson:"chat_id"` Message string `bson:"message"` Date time.Time `bson:"date"` Until time.Time `bson:"until"` MessageLink string `bson:"link"` //https://t.me/c/1402723647/279354/363305 } func (Mute) Coll() string { return "mutes" }