Files
latosa-escrima/backend/core/models/events_to_user.go
2025-01-29 18:09:41 +01:00

17 lines
353 B
Go

package models
import (
"github.com/google/uuid"
"github.com/uptrace/bun"
)
type EventToUser struct {
bun.BaseModel `bun:"table:events_to_users"`
EventID uuid.UUID `bun:"type:uuid,pk"`
UserID uuid.UUID `bun:"type:uuid,pk"`
Event *Event `bun:"rel:belongs-to,join:event_id=event_id"`
User *User `bun:"rel:belongs-to,join:user_id=user_id"`
}