ChatRelation.php 629 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\common\model\plus\chat;
  3. use app\common\model\BaseModel;
  4. /**
  5. * 客服消息关系模型
  6. */
  7. class ChatRelation extends BaseModel
  8. {
  9. protected $pk = 'relation_id';
  10. protected $name = 'chat_relation';
  11. /**
  12. * 关联会员表
  13. */
  14. public function user()
  15. {
  16. return $this->belongsTo('app\\common\\model\\user\\User', 'user_id', 'user_id');
  17. }
  18. /**
  19. * 关联供应商表
  20. */
  21. public function supplier()
  22. {
  23. return $this->belongsTo('app\\common\\model\\supplier\\Supplier', 'shop_supplier_id', 'shop_supplier_id');
  24. }
  25. }