/** * @inheritdoc */ public function rules() { return [[['proyecto', 'comite'], 'integer'], [['fecha_aprobacion'], 'safe'], [['acta_aprobacion', 'usuario_aprobo'], 'string', 'max' => 255], [['comite'], 'exist', 'skipOnError' => true, 'targetClass' => Comite::className(), 'targetAttribute' => ['comite' => 'id']], [['proyecto'], 'exist', 'skipOnError' => true, 'targetClass' => Faer::className(), 'targetAttribute' => ['proyecto' => 'numero']]]; }
/** * @return \yii\db\ActiveQuery */ public function getIdComite() { return $this->hasOne(Comite::className(), ['id' => 'id_comite']); }
/** * @return \yii\db\ActiveQuery */ public function getComites() { return $this->hasMany(Comite::className(), ['subtipo' => 'id']); }