1
# Copyright 2010 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
6
from django.db import models
8
from identityprovider.models import Account, Person
9
from identityprovider.models.const import EmailStatus
16
class EmailAddress(models.Model):
17
email = models.TextField()
18
person = models.ForeignKey(Person, db_column='person',
19
blank=True, null=True)
20
status = models.IntegerField(choices=EmailStatus._get_choices())
21
date_created = models.DateTimeField(default=datetime.datetime.utcnow,
22
blank=True, editable=False)
23
account = models.ForeignKey(Account, db_column='account',
24
blank=True, null=True)
27
app_label = 'identityprovider'
28
db_table = u'emailaddress'
30
def __unicode__(self):