12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- from sqlalchemy import Column, String, Float
- from sqlalchemy.dialects.postgresql import TEXT
- from app.database import Base
- class AtmoSampleData(Base):
- """
- 大气颗粒物采样点数据模型
- @param {str} id - 采样点ID(主键)
- @param {float} longitude - 经度坐标(精确到小数点后六位)
- @param {float} latitude - 纬度坐标(精确到小数点后六位)
- @param {str} sampling_location - 采样地点描述
- @param {str} start_time - 采样开始时间(精确到秒)
- @param {str} end_time - 采样结束时间(精确到秒)
- @param {str} cumulative_time - 累计采样时长
- @param {float} average_flow_rate - 平均流量(L/min)
- @param {float} cumulative_true_volume - 实况采样体积(L)
- @param {float} cumulative_standard_volume - 标准采样体积(L)
- @param {str} sample_type - 样品类型
- @param {str} sample_name - 样品名称
- @param {float} Cr_particulate - Cr含量(mg/kg)
- @param {float} As_particulate - As含量(mg/kg)
- @param {float} Cd_particulate - Cd含量(mg/kg)
- @param {float} Hg_particulate - Hg含量(mg/kg)
- @param {float} Pb_particulate - Pb含量(mg/kg)
- @param {float} particle_weight - 颗粒物重量(mg)
- @param {float} standard_volume - 标准体积(m³)
- @param {float} particle_concentration - 颗粒物浓度(μg/m³)
- @param {str} sample_code - 样品编码
- @param {float} temperature - 温度(℃)
- @param {float} pressure - 气压(kPa)
- @param {float} humidity - 湿度(%)
- @param {float} wind_speed - 风速(m/s)
- @param {str} wind_direction - 风向
- """
- __tablename__ = 'Atmo_sample_data'
- ID = Column('ID', String(50), primary_key=True, comment='采样点ID')
- longitude = Column('longitude', Float, nullable=True, comment='经度坐标(精确到小数点后六位)')
- latitude = Column('latitude', Float, nullable=True, comment='纬度坐标(精确到小数点后六位)')
- sampling_location = Column('sampling_location', String(500), nullable=True, comment='采样地点')
- # 时间信息
- start_time = Column('start_time', String(20), nullable=True, comment='采样开始时间(精确到秒)')
- end_time = Column('end_time', String(20), nullable=True, comment='采样结束时间(精确到秒)')
- cumulative_time = Column('cumulative_time', String(10), nullable=True, comment='累计采样时长')
- # 采样参数
- average_flow_rate = Column('average_flow_rate', Float, nullable=True, comment='平均流量(L/min)')
- cumulative_true_volume = Column('cumulative_true_volume', Float, nullable=True, comment='实况采样体积(L)')
- cumulative_standard_volume = Column('cumulative_standard_volume', Float, nullable=True, comment='标准采样体积(L)')
- # 样品信息
- sample_type = Column('sample_type', String(50), nullable=True, comment='样品类型')
- sample_name = Column('sample_name', String(50), nullable=True, comment='样品名称')
- # 重金属含量
- Cr_particulate = Column('Cr_particulate', Float, nullable=True, comment='Cr含量(mg/kg)')
- As_particulate = Column('As_particulate', Float, nullable=True, comment='As含量(mg/kg)')
- Cd_particulate = Column('Cd_particulate', Float, nullable=True, comment='Cd含量(mg/kg)')
- Hg_particulate = Column('Hg_particulate', Float, nullable=True, comment='Hg含量(mg/kg)')
- Pb_particulate = Column('Pb_particulate', Float, nullable=True, comment='Pb含量(mg/kg)')
- # 颗粒物物理参数
- particle_weight = Column('particle_weight', Float, nullable=True, comment='颗粒物重量(mg)')
- standard_volume = Column('standard_volume', Float, nullable=True, comment='标准体积(m³)')
- particle_concentration = Column('particle_concentration', Float, nullable=True, comment='颗粒物浓度(μg/m³)')
- # 其他环境参数
- sample_code = Column('sample_code', String(20), nullable=True, comment='样品编码')
- temperature = Column('temperature', Float, nullable=True, comment='温度(℃)')
- pressure = Column('pressure', Float, nullable=True, comment='气压(kPa)')
- humidity = Column('humidity', Float, nullable=True, comment='湿度(%)')
- wind_speed = Column('wind_speed', Float, nullable=True, comment='风速(m/s)')
- wind_direction = Column('wind_direction', String(20), nullable=True, comment='风向')
|