37060-vm/core/models.py
Flatlogic Bot 22430782fa 1
2025-12-18 21:41:14 +00:00

12 lines
559 B
Python

from django.db import models
class Case(models.Model):
full_name = models.CharField(max_length=255)
email = models.EmailField()
phone_number = models.CharField(max_length=20, blank=True)
description = models.TextField()
submitted_at = models.DateTimeField(auto_now_add=True)
status = models.CharField(max_length=20, choices=[('new', 'New'), ('in_review', 'In Review'), ('closed', 'Closed')], default='new')
def __str__(self):
return f"Case for {self.full_name} submitted at {self.submitted_at.strftime('%Y-%m-%d %H:%M')}"