def delete_by_id(self, task_id): Task.delete().where(Task.id == task_id).execute() TaskPlan.delete().where(TaskPlan.task_id == task_id).execute()
def delete_by_id(self, plan_id): TaskPlan.delete().where(TaskPlan.id == plan_id).execute()