Add custom_interval_days to TaskResponse DTO
Field existed in Task model but was missing from API response. Aligns Go API contract with KMM mobile model.
This commit is contained in:
@@ -85,6 +85,7 @@ type TaskResponse struct {
|
||||
Priority *TaskPriorityResponse `json:"priority,omitempty"`
|
||||
FrequencyID *uint `json:"frequency_id"`
|
||||
Frequency *TaskFrequencyResponse `json:"frequency,omitempty"`
|
||||
CustomIntervalDays *int `json:"custom_interval_days"` // For "Custom" frequency, user-specified days
|
||||
InProgress bool `json:"in_progress"`
|
||||
DueDate *time.Time `json:"due_date"`
|
||||
NextDueDate *time.Time `json:"next_due_date"` // For recurring tasks, updated after each completion
|
||||
@@ -237,6 +238,7 @@ func newTaskResponseInternal(t *models.Task, daysThreshold int, now time.Time) T
|
||||
CategoryID: t.CategoryID,
|
||||
PriorityID: t.PriorityID,
|
||||
FrequencyID: t.FrequencyID,
|
||||
CustomIntervalDays: t.CustomIntervalDays,
|
||||
InProgress: t.InProgress,
|
||||
AssignedToID: t.AssignedToID,
|
||||
DueDate: t.DueDate,
|
||||
|
||||
Reference in New Issue
Block a user