*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit e9092ce1 authored by Sharma, Sukrit's avatar Sharma, Sukrit
Browse files

adding new data tables as models

parent 2c1c4a9e
Branches
No related tags found
No related merge requests found
...@@ -88,3 +88,56 @@ class GasWienerNetzteData(models.Model): ...@@ -88,3 +88,56 @@ class GasWienerNetzteData(models.Model):
db_table = 'data_gas' # Table name in the database db_table = 'data_gas' # Table name in the database
app_label = 'load_data' # App label for Django app_label = 'load_data' # App label for Django
managed = False # This model is not managed by Django migrations managed = False # This model is not managed by Django migrations
class BboDatapoints(models.Model):
dp_id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=75, null=True)
category = models.CharField(max_length=25, null=True)
sub_category = models.CharField(max_length=25, null=True)
direction = models.CharField(max_length=25, null=True)
meter_level = models.SmallIntegerField(null=True)
unit = models.CharField(max_length=5, null=True)
location_code = models.CharField(max_length=25, null=True)
location = models.CharField(max_length=30, null=True)
district = models.IntegerField(null=True)
floor = models.FloatField(null=True)
room = models.CharField(max_length=25, null=True)
calculation = models.CharField(max_length=200, null=True)
type = models.SmallIntegerField(null=True)
active = models.SmallIntegerField(null=True)
last_fetched_timestamp = models.DateTimeField(null=True)
last_fetched_timestamp_tu = models.DateTimeField(null=True)
conversion_factor = models.FloatField(null=True)
class Meta:
db_table = 'bbo_datapoints' # Matches the table name in the database
app_label = 'load_data' # Replace with your app name if different
managed = False # Ensures Django doesn't manage this table
class BboDatapointsTags(models.Model):
dp_id = models.IntegerField(primary_key=True)
tag_id = models.IntegerField()
class Meta:
db_table = 'bbo_datapoints_tags' # Matches the table name in the database
app_label = 'load_data' # Replace with your app name if different
managed = False # Ensures Django doesn't manage this table
class BboTags(models.Model):
tag_id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=75)
class Meta:
db_table = 'bbo_tags' # Matches the table name in the database
app_label = 'load_data' # Replace with your app name if different
managed = False # Ensures Django doesn't manage this table
class BboData(models.Model):
dp_id = models.IntegerField(primary_key=True)
utc = models.DateTimeField(null=True) # Start time
value = models.FloatField(null=True)
class Meta:
db_table = 'bbo_data' # Matches the table name in the database
app_label = 'load_data' # Replace with your app name if different
managed = False # Ensures Django doesn't manage this table
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment