| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "Evento".
- *
- * @property int $id
- * @property string $nombre
- * @property string|null $descripcion
- * @property string|null $fotoEvento
- * @property string|null $tag
- * @property string $url
- * @property string|null $fechaInicio
- * @property string|null $fechaFinal
- * @property string|null $creado
- * @property string|null $modificado
- * @property string|null $eliminado
- * @property string|null $firebaseId
- *
- * @property Resultado[] $resultados
- */
- class Evento extends \yii\db\ActiveRecord {
- /**
- * {@inheritdoc}
- */
- public static function tableName() {
- return 'Evento';
- }
- /**
- * {@inheritdoc}
- */
- public function rules() {
- return [
- [['nombre', 'url'], 'required'],
- [['descripcion', 'fotoEvento'], 'string'],
- [['fechaInicio', 'fechaFinal', 'creado', 'modificado', 'eliminado'], 'safe'],
- [['nombre'], 'string', 'max' => 255],
- [['tag', 'firebaseId'], 'string', 'max' => 50],
- [['url'], 'string', 'max' => 155],
- [['tag'], 'unique'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels() {
- return [
- 'id' => 'ID',
- 'nombre' => 'Nombre',
- 'descripcion' => 'Descripcion',
- 'fotoEvento' => 'Foto Evento',
- 'tag' => 'Tag',
- 'url' => 'Url',
- 'fechaInicio' => 'Fecha Inicio',
- 'fechaFinal' => 'Fecha Final',
- 'creado' => 'Creado',
- 'modificado' => 'Modificado',
- 'eliminado' => 'Eliminado',
- 'firebaseId' => 'Firebase ID',
- ];
- }
- /**
- * Gets query for [[resultados]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getResultados() {
- return $this->hasMany(Resultado::className(), ['idEvento' => 'id']);
- }
- }
|