SupplierShareApplyModel.php
1.02 KB
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
39
40
41
42
43
44
45
46
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SupplierShareApplyModel extends Model
{
protected $connection='web';
protected $table='supplier_share_apply';
public $timestamps = false;
//通过
const STATUS_PASS = 2;
//待复审
const STATUS_NEED_REVIEW = 1;
//待提审
const STATUS_PENDING = 0;
//审核不通过
const STATUS_AUDIT_REJECT = -1;
//复审不通过
const STATUS_REVIEW_REJECT = -2;
public function supplier()
{
return $this->hasOne(SupplierChannelModel::class, 'supplier_id', 'supplier_id');
}
public function department()
{
return $this->hasOne(DepartmentModel::class, 'department_id', 'department_id');
}
//申请的部门信息
public function apply_department()
{
return $this->hasOne(DepartmentModel::class, 'department_id', 'apply_department_id');
}
public function apply_user()
{
return $this->hasOne(UserInfoModel::class, 'userId', 'create_uid');
}
}