* @since 2.0.12 */ class Department extends ActiveRecord { /** * {@inheritdoc} */ public static function tableName() { return 'department'; } /** * Returns department employees. * * @return ActiveQuery */ public function getEmployees() { return $this ->hasMany(Employee::className(), [ 'department_id' => 'id', ]) ->inverseOf('department') ; } }