diff --git a/apps/enp/migrations/0002_auto_20240119_1053.py b/apps/enp/migrations/0002_auto_20240119_1053.py index fe9ae22b..aee0c0bd 100644 --- a/apps/enp/migrations/0002_auto_20240119_1053.py +++ b/apps/enp/migrations/0002_auto_20240119_1053.py @@ -45,6 +45,55 @@ SELECT create_hypertable('enp_envdata', 'time'); "DROP TABLE IF EXISTS public.enp_envdata;" ] ), + migrations.CreateModel( + name='EnvData', + fields=[ + ('time', models.DateTimeField(primary_key=True, + serialize=False, verbose_name='采集时间')), + ('is_online', models.PositiveSmallIntegerField( + default=1, verbose_name='是否在线')), + ('running_state', models.PositiveSmallIntegerField( + default=10, verbose_name='运行状态')), + ('dust_rtd', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='颗粒物实测(mg/m3)')), + ('dust_zs', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='颗粒物折算(mg/m3)')), + ('temperature', models.DecimalField( + blank=True, decimal_places=4, max_digits=10, null=True, verbose_name='温度(℃)')), + ('pressure', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='压力(kPa)')), + ('speed', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='流速(m/s)')), + ('humidity', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='湿度(%)')), + ('flux', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='流量(m3/h)')), + ('pm25', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='PM2.5(ug/m3)')), + ('pm10', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='PM10(ug/m3)')), + ('tsp', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='TSP(ug/m3)')), + ('wind_direction', models.PositiveSmallIntegerField( + blank=True, null=True, verbose_name='风向')), + ('wind_speed', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='风速(m/s)')), + ('so2_rtd', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='二氧化硫实测(mg/m3)')), + ('so2_zs', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='二氧化硫折算(mg/m3)')), + ('nox_rtd', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='氮氧化物实测(mg/m3)')), + ('nox_zs', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='氮氧化物折算(mg/m3)')), + ('o2', models.DecimalField(blank=True, decimal_places=4, + max_digits=10, null=True, verbose_name='含氧量(%)')), + ], + options={ + 'db_table': 'enp_envdata', + 'managed': False, + }, + ), migrations.AddField( model_name='drainequip', name='dust_alarm',