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