From f70fc83c08f8f5d952bf3322a8269a7f0a0c2b24 Mon Sep 17 00:00:00 2001 From: Zvonimir Sabljic Date: Fri, 4 Aug 2023 10:18:50 +0200 Subject: [PATCH] Added command runs model --- euclid/database/models/command_runs.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 euclid/database/models/command_runs.py diff --git a/euclid/database/models/command_runs.py b/euclid/database/models/command_runs.py new file mode 100644 index 0000000..8c6db63 --- /dev/null +++ b/euclid/database/models/command_runs.py @@ -0,0 +1,18 @@ +from peewee import * + +from database.models.components.base_models import BaseModel +from database.models.app import App + + +class CommandRuns(BaseModel): + id = AutoField() + app = ForeignKeyField(App) + hash_id = CharField(unique=True, null=False) + command = TextField(null=True) + cli_response = TextField(null=True) + + class Meta: + db_table = 'command_runs' + indexes = ( + (('app', 'hash_id'), True), + ) \ No newline at end of file