38412-vm/core/models.py
2026-02-13 20:26:18 +00:00

14 lines
419 B
Python

from django.db import models
class Booking(models.Model):
name = models.CharField(max_length=255)
email = models.EmailField()
company = models.CharField(max_length=255, blank=True)
message = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"Booking from {self.name} ({self.company})"
class Meta:
ordering = ['-created_at']