mirror of
https://github.com/usememos/memos.git
synced 2024-12-19 00:51:30 +03:00
41eba71f0f
* 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
23 lines
343 B
Go
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)
|
|
}
|