source: src/django_gheat/gheat/models.py@ 9039

Last change on this file since 9039 was 9026, checked in by dennisw, 14 years ago

django_gheat - werkt met database, transprancy gefixed

File size: 826 bytes
Line 
1from django.db import models
2from gheat import managers
3import datetime
4
5
6class Accespoint(models.Model):
7 mac = models.CharField(max_length=17)
8 ssid = models.CharField(max_length=64)
9 encryptie = models.BooleanField()
10 def __unicode__(self):
11 return (self.mac, self.ssid)
12
13
14class Gebruiker(models.Model):
15 gebruiker = models.CharField(max_length=64)
16 apparatuur = models.CharField(max_length=64)
17 def __unicode__(self):
18 return (self.gebruiker, self.apparatuur)
19
20
21class Meting(models.Model):
22 accespoint = models.ForeignKey(Accespoint)
23 gebruiker = models.ForeignKey(Gebruiker)
24 latitude = models.FloatField(name='Latitude', db_column='lat')
25 longitude = models.FloatField(name='Longitude', db_column='lng')
26 signaal = models.IntegerField(max_length=3)
27 datum = models.DateTimeField()
28
29 objects = managers.MetingManager()
Note: See TracBrowser for help on using the repository browser.