memos/store/activity.go

31 lines
523 B
Go
Raw Normal View History

package store
import (
"context"
)
type Activity struct {
2023-08-04 21:55:07 +08:00
ID int32
// Standard fields
2023-08-04 21:55:07 +08:00
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) {
2023-10-27 01:11:41 +08:00
return s.driver.ListActivities(ctx, find)
}