示例#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
 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']);
     }
 }