This commit is contained in:
2025-11-17 01:06:03 +01:00
parent bf78faba28
commit 4e76ee468b
16 changed files with 617 additions and 42 deletions

View File

@@ -7,8 +7,9 @@ import (
)
type ChannelUser struct {
ChannelID uuid.UUID `gorm:"primaryKey" json:"channel_id"`
UserID uuid.UUID `gorm:"primaryKey" json:"user_id"`
ID uuid.UUID `gorm:"primaryKey" json:"id"`
ChannelID uuid.UUID `gorm:"index;not null" json:"channel_id"`
UserID uuid.UUID `gorm:"index;not null" json:"user_id"`
Role string `gorm:"default:'member'" json:"role"`
JoinedAt time.Time `gorm:"autoCreateTime" json:"joined_at"`