<?php
namespace App\Entity;
use App\Repository\GHContratoRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'gh_contrato')]
#[ORM\Entity(repositoryClass: GHContratoRepository::class)]
class GHContrato {
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 100)]
private ?string $domicilioContractual = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $periodoPrueba = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $periodoPruebaFin = null;
#[ORM\Column(length: 255, nullable:true)]
private ?string $contrato = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable:true)]
private ?\DateTimeInterface $fechaImpresion = null;
#[ORM\Column(length: 255, nullable:true)]
private ?string $firma = null;
#[ORM\ManyToOne(inversedBy: 'contrato')]
private ?GHCandidato $candidato = null;
#[ORM\OneToOne(inversedBy: 'contrato', cascade: ['persist', 'remove'])]
private ?GHContratacion $contratacion = null;
#[ORM\Column]
private ?\DateTime $createAt = null;
#[ORM\Column]
private ?\DateTime $updateAt = null;
#[ORM\Column(length: 55)]
private ?string $createUser = null;
#[ORM\Column(length: 55)]
private ?string $updateUser = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $fechaInicio = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $fechaFin = null;
#[ORM\ManyToOne(inversedBy: 'contrato')]
private ?TerEmpresa $empresaFilial = null;
#[ORM\ManyToOne(targetEntity: SecUser::class, inversedBy: 'contratos')] // Cambia inversedBy según tu diseño
#[ORM\JoinColumn(nullable: true)]
private ?SecUser $user = null;
#[ORM\Column(type: 'boolean', options: ['default' => false])]
private bool $notificadoAnualmente = false;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $tiempoPeriodoPrueba = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $venceDia = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $duracionContratoFijo = null;
public function getUser(): ?SecUser
{
return $this->user;
}
public function setUser(?SecUser $user): static
{
$this->user = $user;
return $this;
}
public function getCreateAt(): ?\DateTime {
return $this->createAt;
}
public function setCreateAt(\DateTime $createAt): static {
$this->createAt = $createAt;
return $this;
}
public function getUpdateAt(): ?\DateTime {
return $this->updateAt;
}
public function setUpdateAt(\DateTime $updateAt): static {
$this->updateAt = $updateAt;
return $this;
}
public function getCreateUser(): ?string {
return $this->createUser;
}
public function setCreateUser(string $createUser): static {
$this->createUser = $createUser;
return $this;
}
public function getUpdateUser(): ?string {
return $this->updateUser;
}
public function setUpdateUser(string $updateUser): static {
$this->updateUser = $updateUser;
return $this;
}
public function getId(): ?int {
return $this->id;
}
public function getDomicilioContractual(): ?string {
return $this->domicilioContractual;
}
public function setDomicilioContractual(?string $domicilioContractual): void {
$this->domicilioContractual = $domicilioContractual;
}
/**
* @return \DateTimeInterface|null
*/
public function getPeriodoPrueba(): ?\DateTimeInterface
{
return $this->periodoPrueba;
}
/**
* @param \DateTimeInterface|null $periodoPrueba
*/
public function setPeriodoPrueba(?\DateTimeInterface $periodoPrueba): void
{
$this->periodoPrueba = $periodoPrueba;
}
/**
* @return \DateTimeInterface|null
*/
public function getPeriodoPruebaFin(): ?\DateTimeInterface
{
return $this->periodoPruebaFin;
}
/**
* @param \DateTimeInterface|null $periodoPruebaFin
*/
public function setPeriodoPruebaFin(?\DateTimeInterface $periodoPruebaFin): void
{
$this->periodoPruebaFin = $periodoPruebaFin;
}
public function getContrato(): ?string {
return $this->contrato;
}
public function setContrato(string $contrato): static {
$this->contrato = $contrato;
return $this;
}
public function getFechaImpresion(): ?\DateTimeInterface {
return $this->fechaImpresion;
}
public function setFechaImpresion(\DateTimeInterface $fechaImpresion): static {
$this->fechaImpresion = $fechaImpresion;
return $this;
}
public function getFirma(): ?string {
return $this->firma;
}
public function setFirma(string $firma): static {
$this->firma = $firma;
return $this;
}
public function isAprueba(): ?bool {
return $this->aprueba;
}
public function setAprueba(bool $aprueba): static {
$this->aprueba = $aprueba;
return $this;
}
public function getCandidato(): ?GHCandidato {
return $this->candidato;
}
public function setCandidato(?GHCandidato $candidato): static {
$this->candidato = $candidato;
return $this;
}
public function getContratacion(): ?GHContratacion
{
return $this->contratacion;
}
public function setContratacion(?GHContratacion $contratacion): static
{
$this->contratacion = $contratacion;
return $this;
}
public function getFechaInicio(): ?\DateTimeInterface
{
return $this->fechaInicio;
}
public function setFechaInicio(\DateTimeInterface $fechaInicio): static
{
$this->fechaInicio = $fechaInicio;
return $this;
}
public function getFechaFin(): ?\DateTimeInterface
{
return $this->fechaFin;
}
public function setFechaFin(?\DateTimeInterface $fechaFin): static
{
$this->fechaFin = $fechaFin;
return $this;
}
public function getEmpresaFilial(): ?TerEmpresa
{
return $this->empresaFilial;
}
public function setEmpresaFilial(?TerEmpresa $empresaFilial): static
{
$this->empresaFilial = $empresaFilial;
return $this;
}
public function isNotificadoAnualmente(): bool
{
return $this->notificadoAnualmente;
}
public function setNotificadoAnualmente(bool $notificadoAnualmente): static
{
$this->notificadoAnualmente = $notificadoAnualmente;
return $this;
}
public function getTiempoPeriodoPrueba(): ?string
{
return $this->tiempoPeriodoPrueba;
}
public function setTiempoPeriodoPrueba(?string $tiempoPeriodoPrueba): static
{
$this->tiempoPeriodoPrueba = $tiempoPeriodoPrueba;
return $this;
}
public function getVenceDia(): ?\DateTimeInterface
{
return $this->venceDia;
}
public function setVenceDia(?\DateTimeInterface $venceDia): static
{
$this->venceDia = $venceDia;
return $this;
}
public function getDuracionContratoFijo(): ?string
{
return $this->duracionContratoFijo;
}
public function setDuracionContratoFijo(?string $duracionContratoFijo): static
{
$this->duracionContratoFijo = $duracionContratoFijo;
return $this;
}
}