2023-01-01 18:55:02 +03:00
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
2023-07-06 16:56:42 +03:00
|
|
|
type Activity struct {
|
2023-08-04 16:55:07 +03:00
|
|
|
ID int32
|
2023-06-26 18:06:53 +03:00
|
|
|
|
|
|
|
// Standard fields
|
2023-08-04 16:55:07 +03:00
|
|
|
CreatorID int32
|
2023-06-26 18:06:53 +03:00
|
|
|
CreatedTs int64
|
|
|
|
|
|
|
|
// Domain specific fields
|
|
|
|
Type string
|
|
|
|
Level string
|
|
|
|
Payload string
|
|
|
|
}
|
|
|
|
|
2023-10-09 16:18:33 +03:00
|
|
|
type FindActivity struct {
|
|
|
|
ID *int32
|
|
|
|
}
|
|
|
|
|
2023-07-06 16:56:42 +03:00
|
|
|
func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, error) {
|
2023-09-26 12:16:58 +03:00
|
|
|
return s.driver.CreateActivity(ctx, create)
|
2023-06-26 18:06:53 +03:00
|
|
|
}
|
2023-10-09 16:18:33 +03:00
|
|
|
|
|
|
|
func (s *Store) ListActivity(ctx context.Context, find *FindActivity) ([]*Activity, error) {
|
|
|
|
return s.driver.ListActivity(ctx, find)
|
|
|
|
}
|