Files
stream.api/internal/database/model/user_preferences.gen.go
claude e7fdd0e1ab 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.
2026-03-24 16:08:36 +00:00

31 lines
1.5 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNameUserPreference = "user_preferences"
// UserPreference mapped from table <user_preferences>
type UserPreference struct {
UserID string `gorm:"column:user_id;type:uuid;primaryKey" json:"user_id"`
Language *string `gorm:"column:language;type:text;not null;default:en" json:"language"`
Locale *string `gorm:"column:locale;type:text;not null;default:en" json:"locale"`
EmailNotifications *bool `gorm:"column:email_notifications;type:boolean;not null;default:true" json:"email_notifications"`
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"`
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"`
Version *int64 `gorm:"column:version;type:bigint;not null;default:1;version" json:"-"`
}
// TableName UserPreference's table name
func (*UserPreference) TableName() string {
return TableNameUserPreference
}