2024-03-24 12:29:57 +00:00
|
|
|
package database
|
|
|
|
|
|
|
|
type (
|
|
|
|
StreakMeta struct {
|
2024-03-24 12:45:20 +00:00
|
|
|
Name string `gorm:"primaryKey;size:128"`
|
|
|
|
Value string `gorm:"size:128"`
|
2024-03-24 12:29:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StreakUser struct {
|
|
|
|
TwitchID uint64 `gorm:"primaryKey"`
|
2024-03-24 12:45:20 +00:00
|
|
|
Username string `gorm:"size:128"`
|
2024-03-24 12:29:57 +00:00
|
|
|
StreamsCount uint64
|
|
|
|
CurrentStreak uint64
|
|
|
|
MaxStreak uint64
|
2024-03-24 12:47:43 +00:00
|
|
|
StreakStatus Status `gorm:"size:16"`
|
2024-03-24 12:29:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
)
|