feat: implement AI schedule app with multi-device sync
- Qt 6 desktop client with day/month/year views, AI scheduling, and TOML settings\n- Go sync server with SQLite change stream, WebSocket notifications, and Docker deployment\n- Client outbox/LWW sync, offline retry, and dual-client integration tests\n- Linux fcitx5 setup, validation reports, and Windows MinGW preset
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/misaki/Schedule/server/internal/model"
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("not found")
|
||||
|
||||
// Store is the persistence contract; SQLite is the default implementation and
|
||||
// the interface is intentionally small enough to add PostgreSQL later.
|
||||
type Store interface {
|
||||
RegisterDevice(ctx context.Context, device model.Device) error
|
||||
DeviceByTokenHash(ctx context.Context, hash string) (model.Device, error)
|
||||
AppendChanges(ctx context.Context, deviceID string, inputs []model.ChangeInput) (int64, error)
|
||||
ChangesSince(ctx context.Context, since int64, limit int) ([]model.Change, int64, bool, error)
|
||||
LatestSeq(ctx context.Context) (int64, error)
|
||||
Export(ctx context.Context) (model.ExportData, error)
|
||||
Close() error
|
||||
}
|
||||
Reference in New Issue
Block a user