From 45e18c8edd55e98712d5f175ecaaae86fde4d933 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sat, 6 Jul 2024 02:36:14 -0400 Subject: Add GetChoreDetail endpoint to retrieve detailed chore information --- internal/chore/model/model.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/chore/model/model.go') diff --git a/internal/chore/model/model.go b/internal/chore/model/model.go index 09cc658..2e7ee90 100644 --- a/internal/chore/model/model.go +++ b/internal/chore/model/model.go @@ -70,3 +70,15 @@ type Tag struct { // CircleID int `json:"circleId" gorm:"primaryKey;autoIncrement:false"` // TagID int `json:"tagId" gorm:"primaryKey;autoIncrement:false"` // } + +type ChoreDetail struct { + ID int `json:"id" gorm:"column:id"` + Name string `json:"name" gorm:"column:name"` + FrequencyType string `json:"frequencyType" gorm:"column:frequency_type"` + NextDueDate *time.Time `json:"nextDueDate" gorm:"column:next_due_date"` + AssignedTo int `json:"assignedTo" gorm:"column:assigned_to"` + LastCompletedDate *time.Time `json:"lastCompletedDate" gorm:"column:last_completed_date"` + LastCompletedBy *int `json:"lastCompletedBy" gorm:"column:last_completed_by"` + TotalCompletedCount int `json:"totalCompletedCount" gorm:"column:total_completed"` + CreatedBy int `json:"createdBy" gorm:"column:created_by"` +} -- cgit