| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "NotificacionUsuario".
- *
- * @property int $id
- * @property int|null $idNotificacion
- * @property int|null $idUsuario
- * @property string|null $nombre
- * @property string|null $telefono
- * @property string|null $parametros
- * @property string|null $detalle
- *
- * @property Notificacion $notificacion
- * @property Usuario $usuario
- */
- class NotificacionUsuario extends \yii\db\ActiveRecord {
- /**
- * {@inheritdoc}
- */
- public static function tableName() {
- return 'NotificacionUsuario';
- }
- /**
- * {@inheritdoc}
- */
- public function rules() {
- return [
- [['idNotificacion', 'idUsuario'], 'default', 'value' => null],
- [['idNotificacion', 'idUsuario'], 'integer'],
- [['parametros', 'detalle'], 'safe'],
- [['nombre'], 'string', 'max' => 100],
- [['telefono'], 'string', 'max' => 10],
- [['idNotificacion'], 'exist', 'skipOnError' => true, 'targetClass' => Notificacion::class, 'targetAttribute' => ['idNotificacion' => 'id']],
- [['idUsuario'], 'exist', 'skipOnError' => true, 'targetClass' => Usuario::class, 'targetAttribute' => ['idUsuario' => 'id']],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels() {
- return [
- 'id' => 'ID',
- 'idNotificacion' => 'Id Notificacion',
- 'idUsuario' => 'Id Usuario',
- 'nombre' => 'Nombre',
- 'telefono' => 'Telefono',
- 'parametros' => 'Parametros',
- 'detalle' => 'Detalle',
- ];
- }
- /**
- * Gets query for [[notificacion]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getNotificacion() {
- return $this->hasOne(Notificacion::class, ['id' => 'idNotificacion']);
- }
- /**
- * Gets query for [[usuario]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getUsuario() {
- return $this->hasOne(Usuario::class, ['id' => 'idUsuario']);
- }
- }
|