chore: update activity store definition

This commit is contained in:
Steven
2023-10-27 23:24:56 +08:00
parent 9d2b785be6
commit 1b34119e60
5 changed files with 106 additions and 7 deletions

View File

@@ -2,8 +2,30 @@ package store
import (
"context"
storepb "github.com/usememos/memos/proto/gen/store"
)
type ActivityType string
const (
ActivityTypeMemoComment ActivityType = "MEMO_COMMENT"
)
func (t ActivityType) String() string {
return string(t)
}
type ActivityLevel string
const (
ActivityLevelInfo ActivityLevel = "INFO"
)
func (l ActivityLevel) String() string {
return string(l)
}
type Activity struct {
ID int32
@@ -12,9 +34,9 @@ type Activity struct {
CreatedTs int64
// Domain specific fields
Type string
Level string
Payload string
Type ActivityType
Level ActivityLevel
Payload *storepb.ActivityPayload
}
type FindActivity struct {