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
<?php
 
 
namespace app\common\model\branch;
use app\common\model\BaseModel;
 
/**
 * 供应商服务保障申请模型
 */
class ServiceApply extends BaseModel
{
    protected $pk = 'service_apply_id';
    protected $name = 'branch_service_apply';
 
    /**
     * 详情
     */
    public static function detail($service_security_id,$branch_id){
        return (new static())->where('service_security_id', '=', $service_security_id)->where('branch_id','=',$branch_id)->find();
    }
    /**
     * 关联供应商表
     */
    public function branch()
    {
        return $this->belongsTo('app\\common\\model\\branch\\Branch', 'branch_id', 'branch_id');
    }
    /**
     * 关联服务
     */
    public function server()
    {
        return $this->hasOne('app\\common\\model\\branch\\ServiceSecurity', 'service_security_id', 'service_security_id');
    }  
}