From 91edf100d4425b081e52662594288cbdd6ddb28d Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Wed, 11 Feb 2026 14:23:14 +0100 Subject: [PATCH] Added the "order" property to the Todo model in the app target. --- App/Sources/Models/Todo.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/App/Sources/Models/Todo.swift b/App/Sources/Models/Todo.swift index b127928..6b0fafe 100644 --- a/App/Sources/Models/Todo.swift +++ b/App/Sources/Models/Todo.swift @@ -16,6 +16,9 @@ final class Todo { /// An optional note providing additional details about the todo task. var note: String? + /// The display order of the todo task. + var order: Int + /// The title of the todo task. var title: String @@ -27,15 +30,18 @@ final class Todo { /// - note: An optional note providing additional details. /// - due: The date by which the todo should be completed. /// - completed: The date when the todo was completed, if applicable. + /// - order: The display order of the todo task. init( title: String, note: String? = nil, due: Date, - completed: Date? = nil + completed: Date? = nil, + order: Int = 0 ) { self.completed = completed self.due = due self.note = note + self.order = order self.title = title }