summaryrefslogtreecommitdiffstats
path: root/data_model/SubTask.gd
diff options
context:
space:
mode:
Diffstat (limited to 'data_model/SubTask.gd')
-rw-r--r--data_model/SubTask.gd48
1 files changed, 24 insertions, 24 deletions
diff --git a/data_model/SubTask.gd b/data_model/SubTask.gd
index fa044a5..ffb4d2e 100644
--- a/data_model/SubTask.gd
+++ b/data_model/SubTask.gd
@@ -1,24 +1,24 @@
-class_name SubTask
-
-class SubTask_data:
- var id
- var task_id
- var name
- var date_completed
-
- func _init(record):
- self.id = record['id']
- self.task_id = record['task_id']
- self.name = record['name']
- self.date_completed = record['date_completed']
-
-static func get_by_task(task_id):
- var records = DBMS.query("""
- SELECT * FROM "SubTasks"
- WHERE task_id = ?
- """,
- [task_id])
- var subtasks = []
- for record in records:
- subtasks.push_back(SubTask_data.new(record))
- return subtasks
+class_name SubTask
+
+class SubTask_data:
+ var id
+ var task_id
+ var name
+ var date_completed
+
+ func _init(record):
+ self.id = record['id']
+ self.task_id = record['task_id']
+ self.name = record['name']
+ self.date_completed = record['date_completed']
+
+static func get_by_task(task_id):
+ var records = DBMS.query("""
+ SELECT * FROM "SubTasks"
+ WHERE task_id = ?
+ """,
+ [task_id])
+ var subtasks = []
+ for record in records:
+ subtasks.push_back(SubTask_data.new(record))
+ return subtasks