# Path: apps/account/models.py
# class Account(Model):
# 
#     # main data
#     user = ForeignKey('auth.User', unique=True, related_name="accounts")
#     description = TextField(blank=True)
#     source = CharField(max_length=64, choices=SOURCE_CHOICES, default='OTHER')
#     mobile = CharField(max_length=1024, blank=True)
#     links = ManyToManyField('link.Link', null=True, blank=True) 
#     passport = ProcessedImageField(upload_to=_upload_to, null=True, blank=True, 
#                                    processors=[ResizeToFit(1024, 768)],
#                                    format='JPEG', options={'quality': 90})
# 
#     # meta
#     # created_by = self
#     # updated_by = self
#     created_on = DateTimeField(auto_now_add=True)
#     updated_on = DateTimeField(auto_now=True)
# 
#     def get_name():
#         return self.user.username
# 
#     def __unicode__(self):
#         return self.user.username
# 
#     class Meta:
# 
#         ordering = ['user__username']


from django.db.models import Model
from django.db.models import ForeignKey
from django.db.models import IntegerField
from django.db.models import BooleanField
from django.db.models import CharField
from django.db.models import DateTimeField
from django.utils.translation import ugettext as _
from apps.account.models import Account
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 




class Station(Model):

    team        = ForeignKey("team.Team", related_name="stations")
    responsible = ForeignKey(Account)
    active      = BooleanField(default=True)
    street      = CharField(max_length=1024)
    city        = CharField(max_length=1024)
    postalcode  = CharField(max_length=1024)
    
    # metadata
    created_by  = ForeignKey(Account, related_name="stations_created")
    created_on  = DateTimeField(auto_now_add=True)

# Path: apps/account/models.py
# class Account(Model):
# 
#     # main data
#     user = ForeignKey('auth.User', unique=True, related_name="accounts")
#     description = TextField(blank=True)
#     source = CharField(max_length=64, choices=SOURCE_CHOICES, default='OTHER')
#     mobile = CharField(max_length=1024, blank=True)
#     links = ManyToManyField('link.Link', null=True, blank=True) 
#     passport = ProcessedImageField(upload_to=_upload_to, null=True, blank=True, 
#                                    processors=[ResizeToFit(1024, 768)],
#                                    format='JPEG', options={'quality': 90})
# 
#     # meta
#     # created_by = self
#     # updated_by = self
#     created_on = DateTimeField(auto_now_add=True)
#     updated_on = DateTimeField(auto_now=True)
# 
#     def get_name():
#         return self.user.username
# 
#     def __unicode__(self):
#         return self.user.username
# 
#     class Meta:
# 
#         ordering = ['user__username']


# Path: apps/station/models.py
from django.db.models import Model
from django.db.models import ForeignKey
from django.db.models import IntegerField
from django.db.models import BooleanField
from django.db.models import CharField
from django.db.models import DateTimeField
from django.utils.translation import ugettext as _
from apps.account.models import Account

# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 




class Station(Model):

    team        = ForeignKey("team.Team", related_name="stations")
    responsible = ForeignKey(Account)
    active      = BooleanField(default=True)
    street      = CharField(max_length=1024)
    city        = CharField(max_length=1024)
    postalcode  = CharField(max_length=1024)
    
    # metadata
    created_by  = ForeignKey(Account, related_name="stations_created")
    created_on  = DateTimeField(auto_now_add=True)

    updated_by  = ForeignKey(Account, related_name="stations_updated")