quanwei
2025-11-01 121b714d710cf3c865f4a1b5efe81abec11056d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
 
 
namespace app\common\model\branch;
 
use app\common\model\BaseModel;
use app\common\service\order\OrderService;
/**
 * 供应商申请模型
 */
class DepositOrder extends BaseModel
{
    protected $pk = 'order_id';
    protected $name = 'branch_deposit_order';
 
   /**
     * 生成订单号
     */
    public function orderNo()
    {
        return OrderService::createOrderNo();
    }
    /**
     * 关联用户表
     */
    public function user()
    {
        return $this->belongsTo('app\\common\\model\\user\\User', 'user_id', 'user_id');
    }
    /**
     * 获取订单详情
     */
    public static function detail($where)
    {
        $model = (new static())->where($where)->find();
        return $model;
    }
}