bugfix on transmissions table

main
Nilo Roberto C Paim 2025-12-05 23:59:57 -03:00
parent 25fbb60a5e
commit 6df045e13c
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ func (Canal) TableName() string {
// CurrentTransmission represents the transmissions table in the database
type CurrentTransmission struct {
ID uint `gorm:"primaryKey;column:id;autoIncrement"`
Canal string `gorm:"column:canal;type:text;not null"`
Canal uint `gorm:"column:canal;type:text;not null"`
Inicio time.Time `gorm:"column:inicio;type:timestamp;not null"`
Duracao int `gorm:"column:duracao;not null"`
Assistentes int `gorm:"column:assistentes;not null"`

View File

@ -38,7 +38,7 @@ func VerifyTransmissionAuthorization(channelname, sessionid, transmissionkey, pl
log.Printf("Error finding channel '%s': %v\n", channelname, result.Error)
}
currentTransmission.Canal = channel.Nome
currentTransmission.Canal = channel.ID
currentTransmission.SessionID = sessionid
currentTransmission.Chave = transmissionkey
currentTransmission.LimiteDiario = channel.LimiteDiario