db

package
v0.0.0-...-f5bd1e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataBase

type DataBase struct {
	Client *mongo.Client
	DB     *mongo.Database
}
var TgDatabase *DataBase

type Message

type Message struct {
	ID         primitive.ObjectID `bson:"_id"`
	UserID     primitive.ObjectID `bson:"user_id"`
	MessageID  int                `bson:"message_id"`
	UpdateId   int                `bson:"update_id"`
	FromUserId int                `bson:"from_user_id"`
	Date       int                `bson:"date"`
	ChatID     int64              `bson:"chat_id"`
	Text       string             `bson:"text"`
	Origin     string             `bson:"origin"`
}

type PushMessage

type PushMessage struct {
	ID      primitive.ObjectID `bson:"_id"`
	UserID  primitive.ObjectID `bson:"user_id"`
	Title   string             `bson:"title" json:"title" form:"title"`
	Type    string             `bson:"type" json:"type" form:"type"`
	Content string             `bson:"content" json:"content" form:"content" binding:"required"`
	Status  string             `bson:"status"`
}

type User

type User struct {
	ID     primitive.ObjectID `bson:"_id"`
	UserID int                `bson:"user_id"`
	ChatID int64              `bson:"chat_id"`
	Name   string             `bson:"name"`
	Token  string             `bson:"token"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL