from django.db import models from aitrainer_backoffice.models.notification import Notification from ..models import Customer class NotificationHistory(models.Model): notification_history_id = models.AutoField(primary_key=True) notification = models.ForeignKey(Notification, on_delete=models.CASCADE) customer = models.ForeignKey(Customer, on_delete=models.CASCADE) response = models.CharField(max_length=255) notification_date = models.DateField(blank=True, null=True) class Meta: db_table = 'notification_history' app_label = 'controlling' def __str__(self): return f'{self.notification};{self.customer};{self.response}'