mirror of
https://github.com/usememos/memos.git
synced 2024-12-18 16:41:44 +03:00
fa2bba51c1
Add support for ListActivity
31 lines
521 B
Go
31 lines
521 B
Go
package store
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Activity struct {
|
|
ID int32
|
|
|
|
// Standard fields
|
|
CreatorID int32
|
|
CreatedTs int64
|
|
|
|
// Domain specific fields
|
|
Type string
|
|
Level string
|
|
Payload string
|
|
}
|
|
|
|
type FindActivity struct {
|
|
ID *int32
|
|
}
|
|
|
|
func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, error) {
|
|
return s.driver.CreateActivity(ctx, create)
|
|
}
|
|
|
|
func (s *Store) ListActivity(ctx context.Context, find *FindActivity) ([]*Activity, error) {
|
|
return s.driver.ListActivity(ctx, find)
|
|
}
|