harp-orm / locations
地区、国家和城市。
0.3.0
2014-07-14 07:51 UTC
Requires
- php: >=5.4.0
- harp-orm/materialized-path: ~0.3.0
This package is auto-updated.
Last update: 2024-09-21 20:48:51 UTC
README
地区、国家和城市。层次化位置结构 - 您可以有包含国家或城市的地区。
用法
直接使用提供的模型
所有位置都保存在一个表中,它们之间的关系通过 harp-orm/materialized-path 处理。所有模型都是 Location 模型的子类,继承其方法。
数据库表
┌─────────────────────────┐
│ Table: Location │
├─────────────┬───────────┤
│ id │ ingeter │
│ name │ string │
│ class │ string │
│ parentId │ integer │
│ path │ string │
│ code │ string │
└─────────────┴───────────┘
方法
City、Country、Region 和 Location 模型有一些辅助方法
许可证
版权(c)2014,Clippings Ltd。由 Ivan Kerin 开发
根据 BSD-3-Clause 许可证,阅读 LICENSE 文件。