from sqlalchemy import create_engine, Column, BigInteger, String, Text, DateTime, CHAR,Integer,Float, Enum from database import Base from datetime import datetime class GovdataCity(Base): __tablename__ = 'govdata_city' id = Column(Integer, primary_key=True, comment='主键') name = Column(String(40), comment='省市区名称') parentid = Column(Integer, comment='上级ID') shortname = Column(String(40), comment='简称') leveltype = Column(Integer, comment='级别:0,中国;1,省分;2,市;3,区、县') citycode = Column(String(7), comment='城市代码') zipcode = Column(String(7), comment='邮编') lng = Column(String(20), comment='经度') lat = Column(String(20), comment='纬度') pinyin = Column(String(40), comment='拼音') status = Column(Enum('0', '1'), default='1', comment='状态') class GovdataArea(Base): __tablename__ = 'govdata_area' id = Column(Integer, primary_key=True, comment='ID') area_code = Column(String(20), nullable=True, comment='区划编码') area_name = Column(String(50), nullable=True, comment='区划名称') parent_code = Column(String(20), nullable=True, comment='父级区划编码') parent_id = Column(Integer, nullable=True, comment='父级ID') status = Column(String(2), nullable=True, comment='状态') create_time = Column(String(255), nullable=True, comment='创建时间')