Files
Xor290 c5ee5636ef
ci-api / test (push) Successful in 22m17s
ci-web / test (push) Successful in 13m44s
chore: update
2026-08-02 18:34:59 +02:00

24 lines
956 B
Go

package auth
import "time"
type User struct {
ID string `gorm:"type:uuid;primaryKey" json:"id"`
Username string `gorm:"uniqueIndex;size:64;not null" json:"username"`
Telegram *string `gorm:"size:120" json:"telegram"`
PasswordHash string `gorm:"not null" json:"-"`
Role Role `gorm:"size:20;not null" json:"role"`
TypeAbo string `gorm:"type:varchar(35);default:demo" json:"type_abonnement"`
ExpiredAt time.Time `json:"expired_at"`
// Réglages d'alerte monitoring (admin uniquement) : chaque admin
// configure son propre canal, aucune variable d'env globale — voir
// internal/alerts et internal/profile (Get/SetAlertSettings).
AlertDiscordWebhookURL *string `gorm:"size:500" json:"-"`
AlertTelegramBotToken *string `gorm:"size:200" json:"-"`
AlertTelegramChatID *string `gorm:"size:64" json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}