Line | |
---|
1 | from django.db import models
|
---|
2 | import datetime
|
---|
3 |
|
---|
4 |
|
---|
5 | class Accespoint(models.Model):
|
---|
6 | mac = models.CharField(max_length=17)
|
---|
7 | ssid = models.CharField(max_length=64)
|
---|
8 | encryptie = models.BooleanField()
|
---|
9 | def __unicode__(self):
|
---|
10 | return (self.mac, self.ssid)
|
---|
11 |
|
---|
12 |
|
---|
13 | class Meting(models.Model):
|
---|
14 | accespoint = models.ForeignKey(Accespoint)
|
---|
15 | gebruiker = models.ForeignKey(Gebruiker) #eventueel
|
---|
16 | lat = models.DecimalField(max_digits=9, decimal_places=7)
|
---|
17 | lng = models.DecimalField(max_digits=9, decimal_places=7)
|
---|
18 | signaal = models.IntegerField(max_length=3)
|
---|
19 | datum = models.DateTimeField()
|
---|
20 |
|
---|
21 | #eventueel
|
---|
22 | class Gebruiker(models.Model):
|
---|
23 | gebruiker = models.CharField(max_length=64)
|
---|
24 | apparatuur = models.Charfield(max_length=64)
|
---|
25 | def __unicode__(self):
|
---|
26 | return (self.gebruiker, self.apparatuur)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.