memos/store/activity.go
Athurg Gooth 41eba71f0f
chore: split sql to driver (#2279)
* Add new database interface for SQL operations

* Move SQL code of Activity into Database

* Rename `Database` into `Driver`

* Move SQL code of SystemSetting into Driver

* Fix store.New in text code

* Change database into driver in the variables

* Change sqlite3.New into sqlite3.NewDriver
2023-09-26 17:16:58 +08:00

23 lines
343 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
}
func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, error) {
return s.driver.CreateActivity(ctx, create)
}