Project

General

Profile

Download (1.08 KB) Statistics
| Branch: | Tag: | Revision:

root / uauth / organization / models.py @ ae3961c3

1
from django.db import models
2
from django.utils.translation import ugettext as _
3

    
4
HOTSPOT_CHOICES = (
5
    ('pfsense', 'pfSense'),
6
    ('meraki', 'Cisco Meraki')
7
)
8

    
9

    
10
class Organization(models.Model):
11
    name = models.CharField(_('Name'), max_length=128)
12
    slug = models.SlugField(max_length=128)
13
    hotspot_url = models.CharField(_('Hotspot url'), max_length=128,
14
                                   null=True, blank=True)
15
    hotspot_type = models.CharField(_('Hotspot type'),
16
                                    choices=HOTSPOT_CHOICES,
17
                                    max_length=32)
18

    
19

    
20
class OrganizationMember(models.Model):
21
    customer = models.ForeignKey(Organization)
22
    epti = models.CharField(max_length=128)
23
    entity_id = models.CharField(max_length=256)
24

    
25

    
26
class TemporaryAccount(models.Model):
27
    organization = models.ForeignKey(Organization)
28
    username = models.CharField(_('Username'), max_length=128)
29
    creation_date = models.DateTimeField(auto_now_add=True)
30
    password = models.CharField(_('Password'), max_length=128)
31
    voucher = models.CharField(_('Voucher'), max_length=128)
(3-3/5)