5be7f7f04b
- 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
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
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"`
|
|
}
|