emailservice/mailer/models.py
vickytechkey 663e3cdbd7
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 45s
Initial commit
2026-08-23 09:28:40 +05:30

12 lines
508 B
Python

from django.db import models
class EmailLog(models.Model):
recipient = models.EmailField()
subject = models.CharField(max_length=255)
template_name = models.CharField(max_length=100) # 'verification', 'password_reset', 'promotional'
status = models.CharField(max_length=50) # 'success', 'failed'
sent_at = models.DateTimeField(auto_now_add=True)
error_message = models.TextField(blank=True)
def __str__(self):
return f"{self.recipient} - {self.subject} ({self.status})"