Beispiel #1
0
 public function getStaffs()
 {
     return $this->hasMany(MStaff::className(), ['gh_id' => 'gh_id']);
 }
Beispiel #2
0
 public function getStaff()
 {
     return $this->hasOne(MStaff::className(), ['staff_id' => 'staff_id']);
 }
Beispiel #3
0
 public function getSceneStaff()
 {
     if ($this->scene_pid == 0) {
         return null;
     }
     return $this->hasOne(MStaff::className(), ['gh_id' => 'gh_id', 'scene_id' => 'scene_pid']);
 }
Beispiel #4
0
 public function getStaff()
 {
     return $this->hasOne(MStaff::className(), ['gh_id' => 'gh_id', 'scene_id' => 'scene_id']);
 }
Beispiel #5
0
 public function getSupervisor()
 {
     if ($this->is_selfOperated) {
         return $this->hasOne(MStaff::className(), ['name' => 'manager', 'mobile' => 'mobile', 'gh_id' => 'gh_id']);
     } else {
         return $this->hasOne(MStaff::className(), ['staff_id' => 'staff_id'])->viaTable('wx_rel_supervision_staff_office', ['office_id' => 'office_id']);
     }
 }