Spaces:
Sleeping
Sleeping
Download backend/simulation/models.py from ktongue/simulations_apps: direct link, hf CLI and curl.
- Browser
- Download file 951 Bytes
-
https://huggingface.co/spaces/ktongue/simulations_apps/resolve/main/backend/simulation/models.py
- Command line
-
hf download hf://spaces/ktongue/simulations_apps/backend/simulation/models.py
-
curl -L -o models.py https://huggingface.co/spaces/ktongue/simulations_apps/resolve/main/backend/simulation/models.py
951 Bytes
| from django.db import models | |
| class Simulation(models.Model): | |
| STATUS_CHOICES = [ | |
| ('pending', 'En attente'), | |
| ('running', 'En cours'), | |
| ('completed', 'Terminée'), | |
| ('failed', 'Échouée'), | |
| ] | |
| name = models.CharField(max_length=255, blank=True) | |
| parameters = models.JSONField(default=dict) | |
| status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='pending') | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now=True) | |
| completed_at = models.DateTimeField(null=True, blank=True) | |
| result_summary = models.JSONField(null=True, blank=True) | |
| result_file_path = models.CharField(max_length=500, blank=True) | |
| result_image_path = models.CharField(max_length=500, blank=True) | |
| error_message = models.TextField(blank=True) | |
| def __str__(self): | |
| return f"Simulation #{self.id} - {self.name or 'Sans nom'}" |