Convert backend from submodule to regular directory
Some checks failed
Deploy to NAS / deploy (push) Failing after 4s
Some checks failed
Deploy to NAS / deploy (push) Failing after 4s
Remove submodule tracking; backend is now a plain directory in the repo. Also update deploy workflow: remove --recurse-submodules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
85
backend/internal/domain/models.go
Normal file
85
backend/internal/domain/models.go
Normal file
@@ -0,0 +1,85 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type Trackpoint struct {
|
||||
EventID string `json:"event_id"`
|
||||
DeviceID string `json:"device_id"`
|
||||
TripID string `json:"trip_id"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Lat float64 `json:"lat"`
|
||||
Lon float64 `json:"lon"`
|
||||
Source string `json:"source"` // "gps" | "manual"
|
||||
Note string `json:"note,omitempty"`
|
||||
AccuracyM *float64 `json:"accuracy_m,omitempty"`
|
||||
SpeedMps *float64 `json:"speed_mps,omitempty"`
|
||||
BearingDeg *float64 `json:"bearing_deg,omitempty"`
|
||||
AltitudeM *float64 `json:"altitude_m,omitempty"`
|
||||
}
|
||||
|
||||
type Stop struct {
|
||||
StopID string `json:"stop_id"`
|
||||
DeviceID string `json:"device_id"`
|
||||
TripID string `json:"trip_id"`
|
||||
StartTS time.Time `json:"start_ts"`
|
||||
EndTS time.Time `json:"end_ts"`
|
||||
CenterLat float64 `json:"center_lat"`
|
||||
CenterLon float64 `json:"center_lon"`
|
||||
DurationS int `json:"duration_s"`
|
||||
PlaceLabel string `json:"place_label,omitempty"`
|
||||
PlaceDetails map[string]any `json:"place_details,omitempty"`
|
||||
}
|
||||
|
||||
type Suggestion struct {
|
||||
SuggestionID string `json:"suggestion_id"`
|
||||
StopID string `json:"stop_id"`
|
||||
Type string `json:"type"` // "highlight" | "name_place" | "add_note"
|
||||
Title string `json:"title"`
|
||||
Text string `json:"text"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
DismissedAt *time.Time `json:"dismissed_at,omitempty"`
|
||||
}
|
||||
|
||||
type DaySummary struct {
|
||||
Date string `json:"date"`
|
||||
Count int `json:"count"`
|
||||
FirstTS *time.Time `json:"first_ts,omitempty"`
|
||||
LastTS *time.Time `json:"last_ts,omitempty"`
|
||||
}
|
||||
|
||||
type JournalEntry struct {
|
||||
EntryID string `json:"entry_id"`
|
||||
UserID string `json:"user_id"`
|
||||
EntryDate string `json:"entry_date"` // YYYY-MM-DD
|
||||
EntryTime string `json:"entry_time"` // HH:MM
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Lat *float64 `json:"lat,omitempty"`
|
||||
Lon *float64 `json:"lon,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Images []JournalImage `json:"images,omitempty"`
|
||||
}
|
||||
|
||||
type JournalImage struct {
|
||||
ImageID string `json:"image_id"`
|
||||
EntryID string `json:"entry_id"`
|
||||
Filename string `json:"filename"`
|
||||
OriginalName string `json:"original_name"`
|
||||
MimeType string `json:"mime_type"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
UserID string `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
PasswordHash string `json:"-"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
SessionID string `json:"session_id"`
|
||||
UserID string `json:"user_id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user