Phase 2 completed: Stream Server Auth, Database and Business API
This commit is contained in:
14
internal/model/room.go
Normal file
14
internal/model/room.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// Room represents a user's personal live streaming room.
|
||||
type Room struct {
|
||||
gorm.Model
|
||||
UserID uint `gorm:"uniqueIndex;not null"`
|
||||
Title string `gorm:"default:'My Live Room'"`
|
||||
StreamKey string `gorm:"uniqueIndex;not null"` // Secret key for OBS streaming
|
||||
IsActive bool `gorm:"default:false"` // Whether the stream is currently active
|
||||
}
|
||||
12
internal/model/user.go
Normal file
12
internal/model/user.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User represents a registered user in the system.
|
||||
type User struct {
|
||||
gorm.Model
|
||||
Username string `gorm:"uniqueIndex;not null"`
|
||||
Password string `gorm:"not null"` // Hashed password
|
||||
}
|
||||
Reference in New Issue
Block a user