Selaa lähdekoodia

250211-1代码。

baoyubo 4 kuukautta sitten
vanhempi
commit
922c234db5
3 muutettua tiedostoa jossa 34 lisäystä ja 11 poistoa
  1. 2 1
      models/__init__.py
  2. 31 0
      models/city_base.py
  3. 1 10
      models/risk_management.py

+ 2 - 1
models/__init__.py

@@ -23,4 +23,5 @@ from .duty_base import *
 from .datafilling_base import *
 from .company_management_base import *
 from .resource_provision_base import *
-from .three_proofing_responsible_base import *
+from .three_proofing_responsible_base import *
+from .city_base import *

+ 31 - 0
models/city_base.py

@@ -0,0 +1,31 @@
+from sqlalchemy import create_engine, Column, BigInteger, String, Text, DateTime, CHAR,Integer,Float, Enum, TinyInteger
+
+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(TinyInteger, 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='创建时间')

+ 1 - 10
models/risk_management.py

@@ -27,16 +27,7 @@ class RiskManagementInspectionUser(Base):
     yzy_account = Column(String(50), default=None, 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='创建时间')
+
 
 
 class RiskManagementInspectionTask(Base):