Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Room ¶
type Room struct { gorm.Model Owner User `gorm:"foreignkey:OwnerID"` OwnerID uint `gorm:"UNIQUE_INDEX;NOT_NULL"` HashedPassword string `gorm:"type:CHAR(100)"` Name string `gorm:"type:VARCHAR(36);UNIQUE_INDEX;NOT_NULL"` }
Room is a room a user can create, it can optionally be secured with a passowrd
type RoomVideo ¶
type RoomVideo struct { gorm.Model Room Room RoomID uint `gorm:"INDEX;NOT NULL"` Requester User `gorm:"foreignkey:RequesterID"` RequesterID uint `gorm:"INDEX"` Video Video `gorm:"foreignkey:VideoID"` VideoID uint `gorm:"INDEX"` }
RoomVideo represents a video in a room's video history
type User ¶
type User struct { gorm.Model DiscordID string `gorm:"type:VARCHAR(100);UNIQUE;UNIQUE_INDEX;NOT NULL"` LastDiscordUsername string `gorm:"type:VARCHAR(32)"` LastDiscordDiscriminator string `gorm:"type:VARCHAR(4)"` }
User is identified by their discord ID, and we keep track of their last known discord username and discriminator (i.e. bob#9832).
type UserAuth ¶
type UserAuth struct { gorm.Model AccessToken string `gorm:"type:VARCHAR(30);index"` RefreshToken string `gorm:"type:VARCHAR(30);index"` ExpiresAt time.Time `gorm:"index"` UserID uint `gorm:"UNIQUE_INDEX;NOT_NULL"` User User }
UserAuth contains the Discord OAuth credentials for the user identified by foreign key,
Click to show internal directories.
Click to hide internal directories.