twitch-bot-streak/pkg/database/struct.go
Knut Ahlers d962df9e4b
Fix: Reduce storage size also for status
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-03-24 13:47:43 +01:00

26 lines
623 B
Go

package database
type (
StreakMeta struct {
Name string `gorm:"primaryKey;size:128"`
Value string `gorm:"size:128"`
}
StreakUser struct {
TwitchID uint64 `gorm:"primaryKey"`
Username string `gorm:"size:128"`
StreamsCount uint64
CurrentStreak uint64
MaxStreak uint64
StreakStatus Status `gorm:"size:16"`
}
Status string
)
const (
StatusBroken Status = "broken" // Streak is broken and must be started anew
StatusPending Status = "pending" // Streak is pending to be broken and can be continued
StatusActive Status = "active" // Streak is active (renewed in current stream)
)