rain_base.py 781 B

1234567891011121314151617
  1. from sqlalchemy import Column, String, DateTime, Integer, BigInteger
  2. from sqlalchemy.ext.declarative import declarative_base
  3. from sqlalchemy.orm import sessionmaker
  4. from datetime import datetime
  5. Base = declarative_base()
  6. class GovdataRainDataInfo(Base):
  7. __tablename__ = 'govdata_rain_data_info'
  8. # 定义字段
  9. code = Column(String(50), primary_key=True, nullable=False, comment='编码')
  10. area_name = Column(String(50), nullable=True, comment='区域名称')
  11. address = Column(String(255), nullable=True, comment='地址')
  12. create_time = Column(DateTime, primary_key=True, nullable=False, comment='创建时间')
  13. rainfall = Column(BigInteger, nullable=True, comment='降雨量')
  14. update_time = Column(DateTime, nullable=True, comment='更新时间')