activity: Add initial data structure

activity-log
Harvey Tindall 12 months ago
parent 43e36ee6fc
commit 69dcaf3797
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -21,6 +21,36 @@ type telegramStore map[string]TelegramUser
type matrixStore map[string]MatrixUser
type emailStore map[string]EmailAddress
type ActivityType int
const (
ActivityCreation ActivityType = iota // FIXME
ActivityDeletion // FIXME
ActivityDisabled // FIXME
ActivityEnabled // FIXME
ActivityLinked // FIXME
ActivityChangePassword // FIXME
ActivityResetPassword // FIXME
ActivityCreateInvite // FIXME
)
type ActivitySource int
const (
ActivityUser ActivitySource = iota // Source = UserID. For ActivityCreation, this would mean the referrer.
ActivityAdmin // Source = Admin's UserID, or simply just "admin"
ActivityAnon // Source = Blank, or potentially browser info. For ActivityCreation, this would be via an invite
)
type Activity struct {
Type ActivityType `badgerhold:"index"`
UserID string
SourceType ActivitySource
Source string
InviteCode string // Only set for ActivityCreation
Time time.Time
}
type UserExpiry struct {
JellyfinID string `badgerhold:"key"`
Expiry time.Time

Loading…
Cancel
Save