mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update activity store definition
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user