Ejemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDepartments()
 {
     return $this->hasMany(Departments::className(), ['companies_company_id' => 'company_id']);
 }
Ejemplo n.º 2
0
 public function getDepart()
 {
     return $this->hasOne(Departments::className(), ['id' => 'department_id']);
 }
Ejemplo n.º 3
0
 public function getDeptool()
 {
     // ความสัมพันธ์จาก tools ไปหา departments
     return $this->hasOne(Departments::className(), ['id' => 'department_id']);
 }
Ejemplo n.º 4
0
 public function getDepartments()
 {
     return $this->hasOne(Departments::className(), ['id' => 'iddepartment'])->viaTable(Expenses::tableName(), ['id' => 'idexpense']);
 }
Ejemplo n.º 5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDepartments()
 {
     return $this->hasMany(Departments::className(), ['branches_branch_id' => 'branch_id']);
 }