models.py 639 B

12345678910111213141516171819
  1. from django.db import models
  2. class Run(models.Model):
  3. UPLOAD_STATUS = (
  4. ("Pending", "pending"),
  5. ("Downloading", "downloading"),
  6. ("Uploading", "uploading"),
  7. ("Success", "success"),
  8. ("Failed", "failed"),
  9. )
  10. name = models.CharField(max_length=100)
  11. run = models.CharField(max_length=100, unique=True)
  12. url = models.URLField(max_length=1000)
  13. status = models.CharField(
  14. max_length=50, choices=UPLOAD_STATUS, default="Pending")
  15. upload_status = models.IntegerField(default=0)
  16. started_at = models.DateTimeField(null=True)
  17. done_at = models.DateTimeField(null=True)