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 }