From c8180805656d0a3ea5505f3a43a0ed1641e9bb52 Mon Sep 17 00:00:00 2001 From: xianfuxing Date: Sat, 28 Jul 2018 17:59:07 +0800 Subject: [PATCH] # up counter --- apps/counter/models.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/apps/counter/models.py b/apps/counter/models.py index 137941f..e9eff08 100644 --- a/apps/counter/models.py +++ b/apps/counter/models.py @@ -1 +1,23 @@ +# This is an auto-generated Django model module. +# python manage.py inspectdb device_count --database=counter +# You'll have to do the following manually to clean this up: +# * Rearrange models' order +# * Make sure each model has one field with primary_key=True +# * Make sure each ForeignKey has `on_delete` set to the desired behavior. +# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table +# Feel free to rename the models, but don't rename db_table values or field names. from django.db import models + + +class DeviceCount(models.Model): + device_id = models.CharField(max_length=45, blank=True, null=True) + csq = models.CharField(max_length=45, blank=True, null=True) + count = models.CharField(max_length=45, blank=True, null=True) + vol = models.CharField(max_length=45, blank=True, null=True) + data_time = models.DateTimeField(blank=True, null=True) + longitude = models.FloatField(blank=True, null=True) + latitude = models.FloatField(blank=True, null=True) + + class Meta: + managed = False + db_table = 'device_count'