from django.db import models

import uuid


class EmailEvent(models.Model):
    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(auto_now=True)

    email = models.CharField(max_length=512)
    event = models.CharField(max_length=32)
    timestamp = models.DateTimeField()
    uuid = models.CharField(max_length=64, default=lambda: str(uuid.uuid4()))

    def __unicode__(self):
        return '%s: %s' % (self.email, self.event)

@@ -22,16 +22,193 @@
  models%0A
+from django.contrib.contenttypes.generic import GenericForeignKey%0Afrom django.contrib.contenttypes.models import ContentType%0Afrom django.utils.translation import ugettext as _%0A%0A
 %0Aimport 
@@ -229,13 +229,8 @@
 mail
-Event
 (mod
@@ -268,32 +268,46 @@
 s.DateTimeField(
+_('created'), 
 auto_now_add=Tru
@@ -344,16 +344,30 @@
 meField(
+_('updated'), 
 auto_now
@@ -374,16 +374,181 @@
 =True)%0A%0A
+    content_type = models.ForeignKey(ContentType)%0A    object_id = models.PositiveIntegerField()%0A    content_object = GenericForeignKey('content_type', 'object_id')%0A%0A
     emai
@@ -560,32 +560,48 @@
 odels.CharField(
+_('addressee'), 
 max_length=512)%0A
@@ -621,32 +621,49 @@
 odels.CharField(
+_('event type'), 
 max_length=32)%0A 
@@ -694,24 +694,38 @@
 teTimeField(
+_('timestamp')
 )%0A    uuid =
@@ -742,16 +742,37 @@
 arField(
+_('reference UUID'), 
 max_leng

add generic FK and verbose names