source: src/db/models.py@ 9165

Last change on this file since 9165 was 9010, checked in by dennisw, 14 years ago

Model aangepast

File size: 771 bytes
Line 
1from django.db import models
2import datetime
3
4
5class 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
13class 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
22class 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.