Files
stream.api/internal/database/model/player_configs.gen.go
claude 863a0ea2f6 feat: add notification events handling and MQTT integration
- Implemented notification event publishing with a new NotificationEventPublisher interface.
- Created a noopNotificationEventPublisher for testing purposes.
- Added functionality to publish notification created events via MQTT.
- Introduced a new stream event publisher for handling job logs and updates.
- Added database migration for popup_ads table.
- Created tests for notification events and popup ads functionality.
- Established MQTT connection and publishing helpers for event messages.
2026-03-29 15:47:09 +00:00

39 lines
2.4 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 TableNamePlayerConfig = "player_configs"
// PlayerConfig mapped from table <player_configs>
type PlayerConfig struct {
ID string `gorm:"column:id;type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
UserID string `gorm:"column:user_id;type:uuid;not null;uniqueIndex:idx_player_configs_one_default_per_user,priority:1;index:idx_player_configs_user_default,priority:2;index:idx_player_configs_user_id,priority:1" json:"user_id"`
Name string `gorm:"column:name;type:text;not null" json:"name"`
Description *string `gorm:"column:description;type:text" json:"description"`
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"`
IsActive *bool `gorm:"column:is_active;type:boolean;not null;default:true" json:"is_active"`
IsDefault bool `gorm:"column:is_default;type:boolean;not null;index:idx_player_configs_is_default,priority:1;index:idx_player_configs_user_default,priority:1" json:"is_default"`
CreatedAt *time.Time `gorm:"column:created_at;type:timestamp(3) without time zone;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp(3) without time zone;not null" json:"updated_at"`
Version *int64 `gorm:"column:version;type:bigint;not null;default:1;version" json:"-"`
EncrytionM3u8 *bool `gorm:"column:encrytion_m3u8;type:boolean;not null;default:true" json:"encrytion_m3u8"`
LogoURL *string `gorm:"column:logo_url;type:character varying(500)" json:"logo_url"`
}
// TableName PlayerConfig's table name
func (*PlayerConfig) TableName() string {
return TableNamePlayerConfig
}