Dashboard-XRoom/core/models/download.py
2025-07-13 14:10:29 +03:30

21 lines
589 B
Python

from django.db import models
class Download(models.Model):
TYPE_CHOICES = [
('windows', 'Windows'),
('android', 'android'),
('linux', 'Linux'),
# Add more types as needed
]
name = models.CharField(max_length=255)
description = models.TextField(blank=True)
url = models.URLField()
version = models.CharField(max_length=50)
type = models.CharField(max_length=50, choices=TYPE_CHOICES)
created_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"{self.name} ({self.type}) - v{self.version}"