| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "EventoAccion".
- *
- * @property int $idEvento
- * @property string $accion
- *
- * @property Evento $evento
- */
- class EventoAccion extends \yii\db\ActiveRecord {
- /**
- * {@inheritdoc}
- */
- public static function tableName() {
- return 'EventoAccion';
- }
- /**
- * {@inheritdoc}
- */
- public function rules() {
- return [
- [['idEvento', 'accion'], 'required'],
- [['idEvento'], 'default', 'value' => null],
- [['idEvento'], 'integer'],
- [['accion'], 'string', 'max' => 10],
- [['idEvento', 'accion'], 'unique', 'targetAttribute' => ['idEvento', 'accion']],
- [['idEvento'], 'exist', 'skipOnError' => true, 'targetClass' => Evento::class, 'targetAttribute' => ['idEvento' => 'id']],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels() {
- return [
- 'idEvento' => 'Id Evento',
- 'accion' => 'Accion',
- ];
- }
- /**
- * Gets query for [[evento]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getEvento() {
- return $this->hasOne(Evento::class, ['id' => 'idEvento']);
- }
- }
|