model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MonitorDB mongo.DB
)

Functions

func Initialize

func Initialize(ctx context.Context)

Types

type AlertTypes

type AlertTypes struct {
	ID         bson.ObjectId `bson:"_id,omitempty" json:"mongo_id"`
	Name       string        `bson:"name" json:"name"`
	PushToken  string        `bson:"push_token" json:"push_token"`
	JoinKey    string        `bson:"join_key" json:"join_key"`
	CreatedAt  time.Time     `bson:"created_at" json:"created_at"`
	ModifiedAt time.Time     `bson:"modified_at" json:"modified_at"`
}

AlertTypes type of alert

type UserAlertRelations

type UserAlertRelations struct {
	ID           bson.ObjectId `bson:"_id,omitempty" json:"mongo_id"`
	CreatedAt    time.Time     `bson:"created_at" json:"created_at"`
	ModifiedAt   time.Time     `bson:"modified_at" json:"modified_at"`
	UserMongoID  bson.ObjectId `bson:"user_id" json:"user_id"`
	AlertMongoID bson.ObjectId `bson:"alert_id" json:"alert_id"`
}

type Users

type Users struct {
	ID         bson.ObjectId `bson:"_id,omitempty" json:"mongo_id"`
	CreatedAt  time.Time     `bson:"created_at" json:"created_at"`
	ModifiedAt time.Time     `bson:"modified_at" json:"modified_at"`
	Name       string        `bson:"name" json:"name"`
	UID        int           `bson:"uid" json:"uid"`
}

Jump to

Keyboard shortcuts

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