mirror of
https://github.com/Dadechin/Dashboard-XRoom.git
synced 2025-07-16 15:14:33 +00:00
14 lines
524 B
Python
14 lines
524 B
Python
from django.db import models
|
|
|
|
class Download(models.Model):
|
|
name = models.CharField(max_length=255)
|
|
description = models.TextField(blank=True)
|
|
url = models.URLField(blank=True) # Optional if file is used
|
|
version = models.CharField(max_length=50)
|
|
type = models.CharField(max_length=50)
|
|
file = models.FileField(upload_to='downloads/', blank=True, null=True)
|
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
|
|
def __str__(self):
|
|
return f"{self.name} ({self.type}) - v{self.version}"
|