Files
taro-bot/app/models/channel.go
Björn Benouarets fc8238759a init: Initial commit
2026-01-20 06:53:05 +01:00

25 lines
703 B
Go

package models
import (
"time"
"github.com/google/uuid"
"gorm.io/gorm"
)
type Channel struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
Name string `gorm:"not null" json:"name"`
TenantID uuid.UUID `gorm:"not null" json:"tenant_id"`
ExternalID string `gorm:"not null" json:"external_id"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
Webhooks []Webhook `gorm:"foreignKey:ChannelID" json:"webhooks"`
}
func (Channel) TableName() string {
return "channels"
}