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,37 @@
|
||||
package model
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type Device struct {
|
||||
ID string `json:"device_id"`
|
||||
Name string `json:"name"`
|
||||
TokenHash string `json:"-"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
|
||||
type ChangeInput struct {
|
||||
EntityType string `json:"entity_type"`
|
||||
EntityID string `json:"entity_id"`
|
||||
Op string `json:"op"`
|
||||
Version int64 `json:"version"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
Payload json.RawMessage `json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
type Change struct {
|
||||
Seq int64 `json:"seq"`
|
||||
DeviceID string `json:"device_id"`
|
||||
EntityType string `json:"entity_type"`
|
||||
EntityID string `json:"entity_id"`
|
||||
Op string `json:"op"`
|
||||
Version int64 `json:"version"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
Payload json.RawMessage `json:"payload,omitempty"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
|
||||
type ExportData struct {
|
||||
Devices []Device `json:"devices"`
|
||||
Changes []Change `json:"changes"`
|
||||
LatestSeq int64 `json:"latest_seq"`
|
||||
}
|
||||
Reference in New Issue
Block a user