Riverlist.php
1.7 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
namespace app\admin\model\river;
use think\Model;
class Riverlist extends Model
{
// 表名
protected $name = 'river_list';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function rivercat()
{
return $this->belongsTo('app\admin\model\river\RiverCat', 'cat_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function reservoirprovince()
{
return $this->belongsTo('app\admin\model\reservoir\Province', 'province_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function reservoirstate()
{
return $this->belongsTo('app\admin\model\reservoir\State', 'state_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function reservoircounty()
{
return $this->belongsTo('app\admin\model\reservoir\County', 'county_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function reservoirstreet()
{
return $this->belongsTo('app\admin\model\reservoir\Street', 'street_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function reservoirvillage()
{
return $this->belongsTo('app\admin\model\reservoir\Village', 'village_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function inspectiondepart()
{
return $this->belongsTo('app\admin\model\inspection\Depart', 'depart_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function inspectionstaff()
{
return $this->belongsTo('app\admin\model\inspection\Staff', 'user_id', 'user_id', [], 'LEFT')->setEagerlyType(0);
}
}