Skip to content

Commit

Permalink
Merge pull request #14 from doneill/task/jdo-33-pending-sync-patrols-…
Browse files Browse the repository at this point in the history
…values

pending sync data
  • Loading branch information
doneill authored Apr 13, 2024
2 parents 5a18a93 + 60a0c66 commit d7f8da3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func open(file string) {
events := data.SelectPendingSyncEvents()

table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"ID", "User", "Title", "Created At"})
table.SetHeader([]string{"ID", "User", "Title", "Values", "Patrol Segment ID", "Created At"})

for _, event := range events {
if event.ProfileID != 0 {
Expand All @@ -72,7 +72,7 @@ func open(file string) {
users = append(users, user.Username)
}
isoTime := utils.ConvertUnixToIso(event.CreatedAt)
table.Append([]string{fmt.Sprintf("%d", event.ID), users[len(users)-1], event.Title, isoTime})
table.Append([]string{fmt.Sprintf("%d", event.ID), users[len(users)-1], event.Title, event.Values, event.PatrolSegmentID, isoTime})
}
table.Render()
default:
Expand Down
12 changes: 7 additions & 5 deletions data/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ type Accounts_User struct {
}

type Event struct {
ID int `gorm:"primaryKey;autoIncrement"`
RemoteID string `json:"remote_id" gorm:"column:remote_id"`
ProfileID int `json:"profile_id" gorm:"column:profile_id"`
Title string `json:"title" gorm:"column:title"`
CreatedAt int64 `json:"created_at" gorm:"created_at"`
ID int `gorm:"primaryKey;autoIncrement"`
RemoteID string `json:"remote_id" gorm:"column:remote_id"`
ProfileID int `json:"profile_id" gorm:"column:profile_id"`
Title string `json:"title" gorm:"column:title"`
Values string `json:"event_values" gorm:"column:event_values"`
PatrolSegmentID string `json:"patrol_segment_id" gorm:"column:patrol_segment_id"`
CreatedAt int64 `json:"created_at" gorm:"created_at"`
}

type User_Profile struct {
Expand Down

0 comments on commit d7f8da3

Please sign in to comment.