models

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID   uint   `gorm:"primaryKey" json:"id"`
	Hash string `gorm:"index:idx_event_hash,unique" json:"unique_hash"`
	City string `gorm:"size:255;not null" json:"city"`

	Address string `gorm:"type:text;not null;index:idx_event_address" json:"address"`

	Start time.Time `gorm:"column:start_at" json:"start_at"`
	End   time.Time `gorm:"column:end_at" json:"end_at"`

	CreatedAt time.Time `json:"created_at"`
}

func (*Event) EndClock added in v0.0.4

func (e *Event) EndClock() string

func (*Event) ResetHash

func (e *Event) ResetHash()

func (*Event) StartClock added in v0.0.4

func (e *Event) StartClock() string

type Listener

type Listener struct {
	ID uint `gorm:"primaryKey" json:"id"`

	// ChatID
	TelegramCID int64 `gorm:"not null" json:"-"`
	// ThreadID
	TelegramTID int64 `gorm:"null" json:"-"`
	// Mattermost channel id
	MattermostCID string `gorm:"type:text" json:"-"`
	// Mattermost root post id for threaded replies
	MattermostRID string `gorm:"type:text" json:"-"`

	// Search Text (sql `like`)
	SearchTerm string `gorm:"type:text;not null;uniqueIndex:idx_listener_term_city" json:"search_term"`
	City       string `gorm:"size:255;not null;uniqueIndex:idx_listener_term_city" json:"city"`
}

type Notification added in v0.0.4

type Notification struct {
	Listener *Listener
	Event    *Event
}

Jump to

Keyboard shortcuts

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