13 lines
464 B
Python
13 lines
464 B
Python
from django.db import models
|
|
|
|
class Movie(models.Model):
|
|
title = models.CharField(max_length=200)
|
|
description = models.TextField()
|
|
genre = models.CharField(max_length=100)
|
|
thumbnail_url = models.URLField(max_length=200)
|
|
video_url = models.URLField(max_length=200)
|
|
is_featured = models.BooleanField(default=False)
|
|
rating = models.DecimalField(max_digits=3, decimal_places=1, default=8.0)
|
|
|
|
def __str__(self):
|
|
return self.title |