AisStoreGroup.php 598 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 核销
  7. */
  8. namespace app\ais\model;
  9. use think\Model;
  10. class AisStoreGroup extends Model{
  11. protected $autoWriteTimestamp = true;
  12. //联盟城市
  13. public function group(){
  14. return $this->belongsToMany('AisStore','AisStoreUnion','store_id','group_id');
  15. }
  16. //用户
  17. public function user(){
  18. return $this->hasOne('app\common\model\SystemUser','id','uid');
  19. }
  20. }