-
Notifications
You must be signed in to change notification settings - Fork 1
/
live_stream.go
29 lines (26 loc) · 1.23 KB
/
live_stream.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package stream
import (
"time"
"github.com/google/uuid"
"github.com/shigde/sfu/internal/activitypub/models"
"github.com/shigde/sfu/internal/auth"
"github.com/shigde/sfu/internal/lobby"
"gorm.io/gorm"
)
type LiveStream struct {
VideoId string `json:"-" gorm:"not null;"`
Video *models.Video `json:"-" gorm:"foreignKey:VideoId;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
UUID uuid.UUID `json:"uuid"`
Title string `json:"title" gorm:"-"`
LobbyId uint `json:"-" gorm:"not null;"`
Lobby *lobby.LobbyEntity `json:"-" gorm:"foreignKey:LobbyId;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
SpaceId uint `json:"-" gorm:"not null;"`
Space *Space `json:"-" gorm:"foreignKey:SpaceId;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
AccountId uint `json:"-" gorm:"not null;"`
Account *auth.Account `json:"-" gorm:"foreignKey:AccountId;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
User string `json:"user"`
ID uint `json:"-" gorm:"primaryKey"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}