Dashboard-XRoom/core/models/download.py

21 lines
589 B
Python
Raw Normal View History

2025-07-13 10:40:29 +00:00
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}"