<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Configuracion
*
* @ORM\Table(name="configuracion")
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity
*/
class Configuracion
{
use Timestamp;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer", length=255)
*/
private $linkdepago_timeout = 5;
/**
* @ORM\Column(type="string", length=255)
*/
private $mail;
/**
* @ORM\Column(type="string", length=255)
*/
private $mail_host;
/**
* @ORM\Column(type="integer", length=255)
*/
private $mail_puerto;
/**
* @ORM\Column(type="string", length=255)
*/
private $mail_usuario;
/**
* @ORM\Column(type="string", length=255)
*/
private $mail_pass;
public function getId(): ?int
{
return $this->id;
}
public function getLinkdepagoTimeout(): ?int
{
return $this->linkdepago_timeout;
}
public function setLinkdepagoTimeout(int $linkdepago_timeout): static
{
$this->linkdepago_timeout = $linkdepago_timeout;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
private function setMail(string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getMailHost(): ?string
{
return $this->mail_host;
}
public function setMailHost(string $mail_host): static
{
$this->mail_host = $mail_host;
return $this;
}
public function getMailPuerto(): ?int
{
return $this->mail_puerto;
}
public function setMailPuerto(int $mail_puerto): static
{
$this->mail_puerto = $mail_puerto;
return $this;
}
public function getMailUsuario(): ?string
{
return $this->mail_usuario;
}
public function setMailUsuario(string $mail_usuario): static
{
$this->mail_usuario = $mail_usuario;
$this->setMail($mail_usuario);
return $this;
}
public function getMailPass(): ?string
{
return $this->mail_pass;
}
// public function setMailPass(string $mail_pass): static
// {
// $this->mail_pass = $mail_pass;
// return $this;
// }
public function setMailPass(?string $mail_pass): static
{
if (!empty($mail_pass)) {
// Aquí deberías añadir tu lógica de encriptación de la contraseña
// Por ejemplo, si estás utilizando algún servicio o librería para encriptar
$this->mail_pass = $mail_pass; // Asumiendo encriptación directa por simplicidad
}
return $this;
}
}