model

package
v0.0.0-...-aebebc0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 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 StreamCredentials

type StreamCredentials struct {
	ID        string `gorm:"primaryKey;type:uuid;default:gen_random_uuid()" json:"id"`
	RTMPUrl   string `json:"rtmp_url"`
	StreamKey string `json:"stream_key"`
	UserID    string `json:"user_id"`
}

type StreamSettings

type StreamSettings struct {
	ID     string `gorm:"primaryKey;type:uuid;default:gen_random_uuid()" json:"id"`
	Title  string `json:"title"`
	UserID string `json:"-"`
}

type User

type User struct {
	ID                string            `gorm:"primaryKey;type:uuid;default:gen_random_uuid()" json:"id"`
	Username          string            `json:"username" gorm:"unique"`
	Password          string            `json:"-"`
	IsAdmin           bool              `json:"is_admin"`
	StreamSettings    StreamSettings    `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"stream_settings,omitempty"`
	StreamCredentials StreamCredentials `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"stream_credentials,omitempty"`
	IsLive            bool              `json:"is_live"`
	LastStreamAt      time.Time         `json:"last_stream_at"`
	CreatedAt         time.Time         `json:"created_at"`
	UpdatedAt         time.Time         `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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