models

package
v1.2.1-0...-6b3618a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatMessage

type ChatMessage struct {
	ID              string            `gorm:"primarykey"`
	CreatedAt       time.Time         `json:"created_at"`
	UserID          string            `json:"user_id"`
	UserDisplayName string            `json:"user_display_name"`
	UserName        string            `json:"user_name"`
	Message         string            `json:"message"`
	Tags            map[string]string `gorm:"serializer:json" json:"tags"`
}

type Clip

type Clip struct {
	UUID        string     `gorm:"primaryKey;uniqueIndex" json:"uuid" form:"uuid"`
	Title       string     `json:"title" form:"title"`
	Duration    int        `json:"duration" form:"duration"`
	Date        *time.Time `json:"date" form:"date" time_format:"2006-01-02T15:04:05.000Z"`
	Filename    string     `json:"filename" form:"filename"`
	Resolution  string     `json:"resolution" form:"resolution"`
	Fps         float32    `json:"fps" form:"fps"`
	Size        int        `json:"size" form:"size"`
	Viewcount   int        `gorm:"default:0" json:"viewcount" form:"viewcount"`
	VodOffset   int        `json:"vod_offset" form:"vod_offset"`
	CreatorUUID string     `json:"creator_uuid" form:"creator_uuid"`
	Creator     Creator    `gorm:"foreignKey:CreatorUUID;references:UUID" form:"creator" json:"creator"`
	GameUUID    string     `json:"game_uuid" form:"game_uuid"`
	Game        Game       `gorm:"foreignKey:GameUUID;references:UUID" json:"game" form:"game"`
	VodUUID     string     `json:"vod_uuid" form:"vod_uuid"`
	Vod         Vod        `gorm:"foreignKey:VodUUID;references:UUID" json:"vod" form:"vod"`
}

type Creator

type Creator struct {
	UUID  string `gorm:"primaryKey;uniqueIndex;not null" json:"uuid"`
	Name  string `json:"name"`
	Clips []Clip `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" json:"clips"`
}

type Emote

type Emote struct {
	ID       string `gorm:"primaryKey;uniqueIndex;not null" json:"id" form:"id"`
	Name     string `json:"name" form:"name"`
	URL      string `json:"url" form:"url"`
	Provider string `json:"provider" form:"provider"`
	Outdated bool   `json:"-" form:"-"`
}

type Game

type Game struct {
	UUID      string `gorm:"primaryKey;uniqueIndex;not null" json:"uuid" form:"uuid"`
	Name      string `json:"name" form:"name"`
	BoxartURL string `json:"box_art_url" form:"box_art_url"`
	Clips     []Clip `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" json:"clips" form:"clips"`
}

type Settings

type Settings struct {
	ID                  int `gorm:"primaryKey;uniqueIndex;not null"`
	BroadcasterId       string
	TtvClientId         string
	TtvClientSecret     string
	TtvBearerToken      string
	TtvBearerExpireDate time.Time
	DateVodsUpdate      time.Time
	DateEmotesUpdate    time.Time
	IsLive              bool
}

type Vod

type Vod struct {
	UUID       string     `gorm:"primaryKey;uniqueIndex" json:"uuid" form:"uuid"`
	Title      string     `gorm:"column:title" json:"title" form:"title"`
	Duration   int        `json:"duration" form:"duration"`
	Date       *time.Time `json:"date" form:"date" time_format:"2006-01-02T15:04:05.000Z"`
	Viewcount  int        `gorm:"default:0" json:"viewcount" form:"viewcount"`
	Filename   string     `json:"filename" form:"filename"`
	Resolution string     `json:"resolution" form:"resolution"`
	Fps        float32    `json:"fps" form:"fps"`
	Size       int        `json:"size" form:"size"`
	Publish    bool       `json:"publish" form:"publish"`
	Clips      []Clip     `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" json:"clips" form:"clips"`
}

Jump to

Keyboard shortcuts

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