feat: Add player_configs feature and migrate user preferences
- Implemented player_configs table to store multiple player configurations per user. - Migrated existing player settings from user_preferences to player_configs. - Removed player-related columns from user_preferences. - Added referral state fields to user for tracking referral rewards. - Created migration scripts for database changes and data migration. - Added test cases for app services and usage helpers. - Introduced video job service interfaces and implementations.
This commit is contained in:
@@ -19,16 +19,8 @@ type UserPreference struct {
|
||||
PushNotifications *bool `gorm:"column:push_notifications;type:boolean;not null;default:true" json:"push_notifications"`
|
||||
MarketingNotifications bool `gorm:"column:marketing_notifications;type:boolean;not null" json:"marketing_notifications"`
|
||||
TelegramNotifications bool `gorm:"column:telegram_notifications;type:boolean;not null" json:"telegram_notifications"`
|
||||
Autoplay bool `gorm:"column:autoplay;type:boolean;not null" json:"autoplay"`
|
||||
Loop bool `gorm:"column:loop;type:boolean;not null" json:"loop"`
|
||||
Muted bool `gorm:"column:muted;type:boolean;not null" json:"muted"`
|
||||
ShowControls *bool `gorm:"column:show_controls;type:boolean;not null;default:true" json:"show_controls"`
|
||||
Pip *bool `gorm:"column:pip;type:boolean;not null;default:true" json:"pip"`
|
||||
Airplay *bool `gorm:"column:airplay;type:boolean;not null;default:true" json:"airplay"`
|
||||
Chromecast *bool `gorm:"column:chromecast;type:boolean;not null;default:true" json:"chromecast"`
|
||||
CreatedAt *time.Time `gorm:"column:created_at;type:timestamp with time zone" json:"created_at"`
|
||||
UpdatedAt *time.Time `gorm:"column:updated_at;type:timestamp with time zone" json:"updated_at"`
|
||||
EncrytionM3u8 bool `gorm:"column:encrytion_m3u8;type:boolean;not null" json:"encrytion_m3u8"`
|
||||
Version *int64 `gorm:"column:version;type:bigint;not null;default:1;version" json:"-"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user