Users mute, admin topics

This commit is contained in:
2023-09-13 22:33:53 +03:00
parent 4afbc2564b
commit c6abbbef1d
5 changed files with 214 additions and 19 deletions

View File

@ -16,6 +16,14 @@ type Chat struct {
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 User struct {
tongo.Item `bson:",inline"`
UserId int64 `bson:"user_id"`
@ -33,3 +41,15 @@ type User struct {
}
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" }