feat: user migration

This commit is contained in:
2026-04-28 19:06:42 +08:00
parent aa90b10f06
commit f9077dafcf
6 changed files with 114 additions and 4 deletions
+4
View File
@@ -19,6 +19,7 @@ type UserFlavorType string
const (
UserFlavorAll UserFlavorType = "all"
UserFlavorFlink UserFlavorType = "flink"
UserFlavorFull UserFlavorType = "full"
UserFlavorLight UserFlavorType = "light"
UserFlavorHeartRate UserFlavorType = "heartrate"
@@ -87,6 +88,9 @@ func (u *User) SupportsFlavor(flavor string) bool {
if u.FlavorType == UserFlavorAll {
return true
}
if u.FlavorType == UserFlavorFlink {
return flavor == string(UserFlavorFlink) || flavor == string(UserFlavorFull) || flavor == string(UserFlavorLight)
}
return string(u.FlavorType) == flavor
}