12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace addons\unishop\model;
- use think\Model;
- class Address extends Model
- {
-
- protected $name = 'unishop_address';
-
- protected $autoWriteTimestamp = 'int';
-
- protected $createTime = 'createtime';
- protected $updateTime = 'updatetime';
-
- const IS_DEFAULT_YES = 1;
- const IS_DEFAULT_NO = 0;
- public function province()
- {
- return $this->belongsTo('area', 'province_id', 'id');
- }
- public function city()
- {
- return $this->belongsTo('area', 'city_id', 'id');
- }
- public function area()
- {
- return $this->belongsTo('area', 'area_id', 'id');
- }
- }
|