Account.php 679 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\common\model\supplier;
  3. use app\common\model\BaseModel;
  4. /**
  5. * 商家供应商提现账户模型
  6. */
  7. class Account extends BaseModel
  8. {
  9. protected $name = 'supplier_account';
  10. protected $pk = 'account_id';
  11. /**
  12. * 关联应用表
  13. */
  14. public function supplier()
  15. {
  16. return $this->belongsTo('app\\common\\model\\supplier\\Supplier', 'shop_supplier_id', 'shop_supplier_id');
  17. }
  18. /**
  19. * 详情
  20. */
  21. public static function detail($shop_supplier_id, $with = [])
  22. {
  23. return (new static())->with($with)->where('shop_supplier_id', '=', $shop_supplier_id)->findOrEmpty();
  24. }
  25. }