예제 #1
0
파일: MGh.php 프로젝트: noikiy/wowewe
 public function getStaffs()
 {
     return $this->hasMany(MStaff::className(), ['gh_id' => 'gh_id']);
 }
예제 #2
0
 public function getStaff()
 {
     return $this->hasOne(MStaff::className(), ['staff_id' => 'staff_id']);
 }
예제 #3
0
파일: MUser.php 프로젝트: noikiy/wowewe
 public function getSceneStaff()
 {
     if ($this->scene_pid == 0) {
         return null;
     }
     return $this->hasOne(MStaff::className(), ['gh_id' => 'gh_id', 'scene_id' => 'scene_pid']);
 }
예제 #4
0
파일: MSceneDay.php 프로젝트: noikiy/wowewe
 public function getStaff()
 {
     return $this->hasOne(MStaff::className(), ['gh_id' => 'gh_id', 'scene_id' => 'scene_id']);
 }
예제 #5
0
파일: MOffice.php 프로젝트: noikiy/wowewe
 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']);
     }
 }