/** * @inheritdoc */ public function rules() { return [[['ID_Bank'], 'integer'], [['Account'], 'string', 'max' => 255], [['ID_Bank'], 'exist', 'skipOnError' => true, 'targetClass' => Bank::className(), 'targetAttribute' => ['ID_Bank' => 'ID']]]; }
/** * @return \yii\db\ActiveQuery */ public function getIdBank() { return $this->hasOne(Bank::className(), ['id' => 'IdBank']); }
public function getBank() { return $this->hasOne(Bank::className(), ['b_id' => 's_b_id']); }