Пример #1
0
 /**
  * @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']]];
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdComite()
 {
     return $this->hasOne(Comite::className(), ['id' => 'id_comite']);
 }
Пример #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getComites()
 {
     return $this->hasMany(Comite::className(), ['subtipo' => 'id']);
 }