1 Star 0 Fork 1

DYOS/china_address

forked from MannixPi/china_address 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
models.py 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
MannixPi 提交于 2023-07-06 16:33 . 第一次提交
from sqlalchemy import Column, String
from db import Base
class ProvinceModel(Base):
"""省模型"""
__tablename__ = 'province'
code = Column(String(255), primary_key=True)
name = Column(String(255))
class CityModel(Base):
"""市模型"""
__tablename__ = 'city'
code = Column(String(255), primary_key=True)
name = Column(String(255))
province_code = Column(String(255))
class AreaModel(Base):
"""县模型"""
__tablename__ = 'area'
code = Column(String(255), primary_key=True)
name = Column(String(255))
province_code = Column(String(255))
city_code = Column(String(255))
class StreetModel(Base):
"""乡镇模型"""
__tablename__ = 'street'
code = Column(String(255), primary_key=True)
name = Column(String(255))
province_code = Column(String(255))
city_code = Column(String(255))
area_code = Column(String(255))
class VillageModel(Base):
"""街道村委会模型"""
__tablename__ = 'village'
code = Column(String(255), primary_key=True)
name = Column(String(255))
province_code = Column(String(255))
city_code = Column(String(255))
area_code = Column(String(255))
street_code = Column(String(255))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/dy/china_address.git
git@gitee.com:dy/china_address.git
dy
china_address
china_address
main

搜索帮助