SimSite Deploy
Deploy SimSite - Simulation platform with FEniCS and Dang Van analysis
4464a90
raw
history blame contribute delete
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'}"