mirror of
https://github.com/Nebucatnetzer/environment_sensors.git
synced 2024-07-21 16:27:30 +02:00
22 lines
451 B
Python
22 lines
451 B
Python
|
from django.db import models
|
||
|
|
||
|
# Create your models here.
|
||
|
class Time(models.Model):
|
||
|
value = DateTimeField()
|
||
|
|
||
|
|
||
|
class Temperatur(models.Model):
|
||
|
time = ForeignKeyField(Time, backref='temperatures')
|
||
|
value = FloatField()
|
||
|
|
||
|
|
||
|
class Humidity(models.Model):
|
||
|
time = ForeignKeyField(Time, backref='humidities')
|
||
|
value = FloatField()
|
||
|
|
||
|
|
||
|
class Pressure(models.Model):
|
||
|
time = ForeignKeyField(Time, backref='pressures')
|
||
|
value = FloatField()
|
||
|
|