Esempio n. 1
0
 public function getStaffs()
 {
     return $this->hasMany(MStaff::className(), ['gh_id' => 'gh_id']);
 }
Esempio n. 2
0
 public function getStaff()
 {
     return $this->hasOne(MStaff::className(), ['staff_id' => 'staff_id']);
 }
Esempio n. 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']);
 }
Esempio n. 4
0
 public function getStaff()
 {
     return $this->hasOne(MStaff::className(), ['gh_id' => 'gh_id', 'scene_id' => 'scene_id']);
 }
Esempio n. 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']);
     }
 }