bunmodel

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	bun.BaseModel `bun:"base_model,table:groups,alias:group"`

	ID            uuid.UUID `bun:"id,pk,nullzero"`
	ServerID      string    `bun:"server_id,nullzero"`
	ChannelGains  string    `bun:"channel_gains,nullzero"`
	ChannelLosses string    `bun:"channel_losses,nullzero"`
	Internals     bool      `bun:"internals"`
	Barbarians    bool      `bun:"barbarians"`
	ServerKey     string    `bun:"server_key,nullzero"`
	VersionCode   string    `bun:"version_code,nullzero"`
	LanguageTag   string    `bun:"language_tag,nullzero"`
	CreatedAt     time.Time `bun:"created_at,nullzero"`
	Monitors      []Monitor `bun:"monitors,rel:has-many,join:id=group_id"`
}

func (Group) ToDomain

func (g Group) ToDomain() domain.GroupWithMonitors

type Monitor

type Monitor struct {
	bun.BaseModel `bun:"base_model,table:monitors,alias:monitor"`

	ID        uuid.UUID `bun:"id,pk,nullzero"`
	GroupID   uuid.UUID `bun:"group_id"`
	TribeID   int       `bun:"tribe_id,nullzero"`
	CreatedAt time.Time `bun:"created_at,nullzero"`
}

func (Monitor) ToDomain

func (m Monitor) ToDomain() domain.Monitor

Jump to

Keyboard shortcuts

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