unusualarchive/core/models.py
2023-05-09 22:12:39 +02:00

17 lines
473 B
Python

from django.db import models
from django.utils import timezone
# Create your models here.
class Video(models.Model):
id = models.AutoField(primary_key=True)
name = models.TextField()
file = models.FileField(upload_to='videos/', null=True)
thumbnail = models.FileField(upload_to='videos/', null=True)
created_at = models.DateTimeField(default=timezone.now)
class Meta:
db_table = 'Video'
def __str__(self):
return str(self.id)