Files
template-vitrine/backend/internal/modules/telegram/model.go
T
Xor290 919c807004
ci-api / test (push) Failing after 8m7s
ci-web / test (push) Failing after 5m5s
chore: build
2026-09-20 12:18:33 +02:00

22 lines
689 B
Go

// Package telegram is the notifications module (spec section 20): the
// admin configures a bot token + chat id and toggles which events trigger a
// message. It is a pluggable notifier -- other modules (orders) depend on
// the small OrderNotifier interface it satisfies, never on Telegram
// directly, so a future module (email, WhatsApp, ...) can be swapped in the
// same way.
package telegram
import "time"
type Settings struct {
ID int16 `gorm:"primaryKey"`
Enabled bool
BotToken string
ChatID string
NotifyNewOrder bool
CreatedAt time.Time
UpdatedAt time.Time
}
func (Settings) TableName() string { return "telegram_settings" }