NotificacionCorreoAdjunto.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\modules\mail\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "NotificacionCorreoAdjunto".
  6. *
  7. * @property int $id
  8. * @property int|null $idNotificacionCorreo
  9. * @property string|null $ruta
  10. *
  11. * @property NotificacionCorreo $notificacionCorreo
  12. */
  13. class NotificacionCorreoAdjunto extends \yii\db\ActiveRecord {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function tableName() {
  18. return 'NotificacionCorreoAdjunto';
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function rules() {
  24. return [
  25. [['idNotificacionCorreo'], 'default', 'value' => null],
  26. [['idNotificacionCorreo'], 'integer'],
  27. [['ruta'], 'string', 'max' => 255],
  28. [['idNotificacionCorreo'], 'exist', 'skipOnError' => true, 'targetClass' => NotificacionCorreo::class, 'targetAttribute' => ['idNotificacionCorreo' => 'id']],
  29. ];
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function attributeLabels() {
  35. return [
  36. 'id' => 'ID',
  37. 'idNotificacionCorreo' => 'Id Notificacion Correo',
  38. 'ruta' => 'Ruta',
  39. ];
  40. }
  41. /**
  42. * Gets query for [[IdNotificacionCorreo0]].
  43. *
  44. * @return \yii\db\ActiveQuery
  45. */
  46. public function getNotificacionCorreo() {
  47. return $this->hasOne(NotificacionCorreo::class, ['id' => 'idNotificacionCorreo']);
  48. }
  49. }