37066-vm/core/models.py
Flatlogic Bot 7b7902f706 Simple CRM
2025-12-19 12:36:27 +00:00

21 lines
728 B
Python

from django.db import models
class Contact(models.Model):
STATUS_CHOICES = [
('Lead', 'Lead'),
('Contacted', 'Contacted'),
('Customer', 'Customer'),
('Lost', 'Lost'),
]
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100)
email = models.EmailField()
phone = models.CharField(max_length=20, blank=True)
company = models.CharField(max_length=100, blank=True)
status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='Lead')
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return f"{self.first_name} {self.last_name}"