示例#1
0
文件: Role.php 项目: tiyolab/autocom
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUserTypes()
 {
     return $this->hasMany(UserType::className(), ['role' => 'id']);
 }
示例#2
0
文件: User.php 项目: tiyolab/autocom
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUserType()
 {
     return $this->hasOne(UserType::className(), ['id' => 'user_type']);
 }