GuardHistory.php 552 B

12345678910111213141516171819202122232425
  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\guard\model;
  9. use think\Model;
  10. class GuardHistory extends Model{
  11. protected $pk = 'id';
  12. //绑定帐号关系
  13. public function account(){
  14. return $this->hasOne('GuardUser','uid','uid');
  15. }
  16. //绑定所属社区
  17. public function guard(){
  18. return $this->hasOne('Guard','id','gid');
  19. }
  20. }