- 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.
31 lines
1.5 KiB
Go
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 TableNamePopupAd = "popup_ads"
|
|
|
|
// PopupAd mapped from table <popup_ads>
|
|
type PopupAd struct {
|
|
ID string `gorm:"column:id;type:uuid;primaryKey" json:"id"`
|
|
UserID string `gorm:"column:user_id;type:uuid;not null;index:idx_popup_ads_user_id,priority:1;index:idx_popup_ads_user_active,priority:2" json:"user_id"`
|
|
Type string `gorm:"column:type;type:character varying(20);not null" json:"type"`
|
|
Label string `gorm:"column:label;type:text;not null" json:"label"`
|
|
Value string `gorm:"column:value;type:text;not null" json:"value"`
|
|
IsActive *bool `gorm:"column:is_active;type:boolean;not null;index:idx_popup_ads_user_active,priority:1;default:true" json:"is_active"`
|
|
MaxTriggersPerSession *int32 `gorm:"column:max_triggers_per_session;type:integer;not null;default:3" json:"max_triggers_per_session"`
|
|
CreatedAt *time.Time `gorm:"column:created_at;type:timestamp with time zone;default:CURRENT_TIMESTAMP" 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 PopupAd's table name
|
|
func (*PopupAd) TableName() string {
|
|
return TableNamePopupAd
|
|
}
|