Coverage for app/models/suggestion.py: 58%

19 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-05-02 02:49 +0000

1from flask import jsonify 

2 

3class Suggestion: 

4 id: int 

5 created_at: str 

6 prompt: str 

7 suggestion_text: str 

8 has_bug: bool 

9 model: str 

10 

11 def __init__(self, id: int, created_at: str, prompt: str, suggestion_text: str, has_bug: bool, model: str): 

12 self.id = id 

13 self.created_at = created_at 

14 self.prompt = prompt 

15 self.suggestion_text = suggestion_text, 

16 self.has_bug = has_bug 

17 self.model = model 

18 

19 def get_suggestion(self): 

20 return self 

21 

22 def to_json(self): 

23 return jsonify(self.__dict__)