Files
uPortal2/backend/internal/invite/model.go
T

17 lines
251 B
Go
Raw Normal View History

2026-10-21 13:17:44 +03:00
package invite
import (
"time"
)
type Invite struct {
Token string
Quota int
Uses int
ExpiresAt time.Time
CreatedAt time.Time
}
func (i *Invite) IsValid() bool {
return time.Now().UTC().Before(i.ExpiresAt) || i.Uses < i.Quota
}