aboutsummaryrefslogtreecommitdiffstats
path: root/internal/chore/model
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-20 03:42:38 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-20 03:42:38 -0400
commitee7a8e24da1dfc959d78236a63ee65acc4be45e4 (patch)
tree5feccf155c39b67606b2de831e5d903d9389e1af /internal/chore/model
parent861a1666e48a91d43db6d1fd272dac832013f5b7 (diff)
downloaddonetick-ee7a8e24da1dfc959d78236a63ee65acc4be45e4.tar.gz
donetick-ee7a8e24da1dfc959d78236a63ee65acc4be45e4.tar.bz2
donetick-ee7a8e24da1dfc959d78236a63ee65acc4be45e4.zip
Update ChoreHistory model to include updatedAt field, Support history modification
Diffstat (limited to '')
-rw-r--r--internal/chore/model/model.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/chore/model/model.go b/internal/chore/model/model.go
index c9cf28c..38d8354 100644
--- a/internal/chore/model/model.go
+++ b/internal/chore/model/model.go
@@ -36,11 +36,12 @@ type ChoreAssignees struct {
type ChoreHistory struct {
ID int `json:"id" gorm:"primary_key"` // Unique identifier
ChoreID int `json:"choreId" gorm:"column:chore_id"` // The chore this history is for
- CompletedAt time.Time `json:"completedAt" gorm:"column:completed_at"` // When the chore was completed
+ CompletedAt *time.Time `json:"completedAt" gorm:"column:completed_at"` // When the chore was completed
CompletedBy int `json:"completedBy" gorm:"column:completed_by"` // Who completed the chore
AssignedTo int `json:"assignedTo" gorm:"column:assigned_to"` // Who the chore was assigned to
Note *string `json:"notes" gorm:"column:notes"` // Notes about the chore
DueDate *time.Time `json:"dueDate" gorm:"column:due_date"` // When the chore was due
+ UpdatedAt *time.Time `json:"updatedAt" gorm:"column:updated_at"` // When the record was last updated
}
type FrequencyMetadata struct {