parameters.py 2.0 KB

123456789101112131415161718192021222324252627282930
  1. from sqlalchemy import Column, Integer, Float, String, create_engine
  2. from sqlalchemy.orm import declarative_base
  3. from app.database import Base
  4. class Parameters(Base):
  5. """参数数据表ORM模型"""
  6. __tablename__ = 'Parameters'
  7. id = Column('ID', Integer, primary_key=True, autoincrement=True)
  8. f1 = Column('F1', Float, default=0.6, comment='活性SOM的占比系数')
  9. f2 = Column('F2', Float, default=0.85, comment='HA占比系数')
  10. f3 = Column('F3', Float, default=0.05, comment='氮肥镉含量平均值(mg/kg)')
  11. f4 = Column('F4', Float, default=0.158, comment='磷肥镉含量平均值(mg/kg)')
  12. f5 = Column('F5', Float, default=0.06, comment='钾肥镉含量平均值(mg/kg)')
  13. f6 = Column('F6', Float, default=0.065, comment='复合肥镉含量平均值(mg/kg)')
  14. f7 = Column('F7', Float, default=0.6, comment='有机肥镉含量平均值(mg/kg)')
  15. f8 = Column('F8', Float, default=0.25, comment='农药镉含量(mg/kg)')
  16. f9 = Column('F9', Float, default=0.35, comment='农家肥镉含量(mg/kg)')
  17. f10 = Column('F10', Float, default=0.25, comment='农膜镉含量(mg/kg)')
  18. f11 = Column('F11', Float, default=800, comment='作物亩产量(斤)')
  19. nf = Column('NF', Float, default=0.05, comment='氮肥单位面积使用量(t/ha/a)')
  20. pf = Column('PF', Float, default=0.158, comment='磷肥单位面积使用量(t/ha/a)')
  21. kf = Column('KF', Float, default=0.06, comment='钾肥单位面积使用量(t/ha/a)')
  22. cf = Column('CF', Float, default=0.065, comment='复合肥单位面积使用量(t/ha/a)')
  23. of = Column('OF', Float, default=0.6, comment='有机肥单位面积使用量(t/ha/a)')
  24. p = Column('P', Float, default=0.25, comment='农药单位面积使用量(t/ha/a)')
  25. ff = Column('FF', Float, default=0.35, comment='农家肥单位面积使用量(t/ha/a)')
  26. af = Column('AF', Float, default=0.25, comment='农膜(存留)单位面积使用量(t/ha/a)')
  27. area = Column('Area', String(50), default='韶关', comment='地区')