This commit is contained in:
CFOU
2026-09-14 20:50:19 +02:00
commit 3091fb4020
135 changed files with 10262 additions and 0 deletions
@@ -0,0 +1,22 @@
// 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
NotifyStatusChange bool
CreatedAt time.Time
UpdatedAt time.Time
}
func (Settings) TableName() string { return "telegram_settings" }