<?php
namespace App\Entity;
use App\Repository\CommitmentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CommitmentRepository::class)]
class Commitment
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'commitments')]
private ?User $user = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tutor_firstname = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tutor_lastname = null;
#[ORM\Column(length: 510, nullable: true)]
private ?string $adress = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $start_date = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(nullable: true)]
private ?bool $company_agreement = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $contract_type = null;
#[ORM\Column(nullable: true)]
private ?bool $tax_learning = null;
#[ORM\Column(nullable: true)]
private ?bool $recent_recruitment = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $received_on = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $received_by = null;
#[ORM\Column(nullable: true)]
private ?int $state = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $author = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_siret = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_idcc = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_ape = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_manager_firstname = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_manager_lastname = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_email = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_phone = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tutor_email = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company_address = null;
#[ORM\Column(nullable: true)]
private ?bool $rf = null;
#[ORM\ManyToOne(inversedBy: 'commitments')]
private ?Member $validated_by = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $validation_date = null;
#[ORM\Column(nullable: true)]
private ?bool $draft = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $relaunch_date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $zipcode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $city = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $appointment_created_on = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $job_title = null;
#[ORM\Column(length: 510, nullable: true)]
private ?string $provident_fund_name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $organization_address_cp = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $title_position_held_by_tutor = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $collective_agreement_level = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $collective_agreement_hierarchical_coefficient = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $trial_period_duration = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $comment = null;
#[ORM\Column(nullable: true)]
private ?bool $isArchived = null;
#[ORM\Column(length: 510, nullable: true)]
private ?string $token = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $setBy = null;
#[ORM\ManyToMany(targetEntity: ObjectiveContract::class, mappedBy: 'commitments')]
private Collection $objectiveContracts;
#[ORM\OneToMany(mappedBy: 'commitment', targetEntity: CommitmentComment::class)]
private Collection $commitmentComments;
#[ORM\Column(length: 255, nullable: true)]
private ?string $user_name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $user_lastname = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $user_phone = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $user_email = null;
public function __construct()
{
$this->objectiveContracts = new ArrayCollection();
$this->commitmentComments = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getTutorFirstname(): ?string
{
return $this->tutor_firstname;
}
public function setTutorFirstname(string $tutor_firstname): self
{
$this->tutor_firstname = $tutor_firstname;
return $this;
}
public function getTutorLastname(): ?string
{
return $this->tutor_lastname;
}
public function setTutorLastname(?string $tutor_lastname): self
{
$this->tutor_lastname = $tutor_lastname;
return $this;
}
public function getAdress(): ?string
{
return $this->adress;
}
public function setAdress(?string $adress): self
{
$this->adress = $adress;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->start_date;
}
public function setStartDate(\DateTimeInterface $start_date): self
{
$this->start_date = $start_date;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function isCompanyAgreement(): ?bool
{
return $this->company_agreement;
}
public function setCompanyAgreement(bool $company_agreement): self
{
$this->company_agreement = $company_agreement;
return $this;
}
public function getContractType(): ?string
{
return $this->contract_type;
}
public function setContractType(?string $contract_type): self
{
$this->contract_type = $contract_type;
return $this;
}
public function isTaxLearning(): ?bool
{
return $this->tax_learning;
}
public function setTaxLearning(bool $tax_learning): self
{
$this->tax_learning = $tax_learning;
return $this;
}
public function isRecentRecruitment(): ?bool
{
return $this->recent_recruitment;
}
public function setRecentRecruitment(?bool $recent_recruitment): self
{
$this->recent_recruitment = $recent_recruitment;
return $this;
}
public function getReceivedOn(): ?\DateTimeInterface
{
return $this->received_on;
}
public function setReceivedOn(\DateTimeInterface $received_on): self
{
$this->received_on = $received_on;
return $this;
}
public function getReceivedBy(): ?string
{
return $this->received_by;
}
public function setReceivedBy(?string $received_by): self
{
$this->received_by = $received_by;
return $this;
}
public function getState(): ?int
{
return $this->state;
}
public function setState(int $state): self
{
$this->state = $state;
return $this;
}
public function getAuthor(): ?string
{
return $this->author;
}
public function setAuthor(?string $author): self
{
$this->author = $author;
return $this;
}
public function getCompanyName(): ?string
{
return $this->company_name;
}
public function setCompanyName(?string $company_name): self
{
$this->company_name = $company_name;
return $this;
}
public function getCompanySiret(): ?string
{
return $this->company_siret;
}
public function setCompanySiret(?string $company_siret): self
{
$this->company_siret = $company_siret;
return $this;
}
public function getCompanyIdcc(): ?string
{
return $this->company_idcc;
}
public function setCompanyIdcc(string $company_idcc): self
{
$this->company_idcc = $company_idcc;
return $this;
}
public function getCompanyApe(): ?string
{
return $this->company_ape;
}
public function setCompanyApe(?string $company_ape): self
{
$this->company_ape = $company_ape;
return $this;
}
public function getCompanyManagerFirstname(): ?string
{
return $this->company_manager_firstname;
}
public function setCompanyManagerFirstname(?string $company_manager_firstname): self
{
$this->company_manager_firstname = $company_manager_firstname;
return $this;
}
public function getCompanyManagerLastname(): ?string
{
return $this->company_manager_lastname;
}
public function setCompanyManagerLastname(?string $company_manager_lastname): self
{
$this->company_manager_lastname = $company_manager_lastname;
return $this;
}
public function getCompanyEmail(): ?string
{
return $this->company_email;
}
public function setCompanyEmail(?string $company_email): self
{
$this->company_email = $company_email;
return $this;
}
public function getCompanyPhone(): ?string
{
return $this->company_phone;
}
public function setCompanyPhone(?string $company_phone): self
{
$this->company_phone = $company_phone;
return $this;
}
public function getTutorEmail(): ?string
{
return $this->tutor_email;
}
public function setTutorEmail(?string $tutor_email): self
{
$this->tutor_email = $tutor_email;
return $this;
}
public function getCompanyAddress(): ?string
{
return $this->company_address;
}
public function setCompanyAddress(?string $company_address): self
{
$this->company_address = $company_address;
return $this;
}
public function isRf(): ?bool
{
return $this->rf;
}
public function setRf(?bool $rf): self
{
$this->rf = $rf;
return $this;
}
public function getValidatedBy(): ?Member
{
return $this->validated_by;
}
public function setValidatedBy(?Member $validated_by): self
{
$this->validated_by = $validated_by;
return $this;
}
public function getValidationDate(): ?\DateTimeInterface
{
return $this->validation_date;
}
public function setValidationDate(?\DateTimeInterface $validation_date): self
{
$this->validation_date = $validation_date;
return $this;
}
public function isDraft(): ?bool
{
return $this->draft;
}
public function setDraft(?bool $draft): self
{
$this->draft = $draft;
return $this;
}
public function getRelaunchDate(): ?\DateTimeInterface
{
return $this->relaunch_date;
}
public function setRelaunchDate(\DateTimeInterface $relaunch_date): self
{
$this->relaunch_date = $relaunch_date;
return $this;
}
public function getZipcode(): ?string
{
return $this->zipcode;
}
public function setZipcode(?string $zipcode): self
{
$this->zipcode = $zipcode;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getAppointmentCreatedOn(): ?\DateTimeInterface
{
return $this->appointment_created_on;
}
public function setAppointmentCreatedOn(\DateTimeInterface $appointment_created_on): self
{
$this->appointment_created_on = $appointment_created_on;
return $this;
}
public function getJobTitle(): ?string
{
return $this->job_title;
}
public function setJobTitle(?string $job_title): self
{
$this->job_title = $job_title;
return $this;
}
public function getProvidentFundName(): ?string
{
return $this->provident_fund_name;
}
public function setProvidentFundName(?string $provident_fund_name): self
{
$this->provident_fund_name = $provident_fund_name;
return $this;
}
public function getOrganizationAddressCp(): ?string
{
return $this->organization_address_cp;
}
public function setOrganizationAddressCp(?string $organization_address_cp): self
{
$this->organization_address_cp = $organization_address_cp;
return $this;
}
public function getTitlePositionHeldByTutor(): ?string
{
return $this->title_position_held_by_tutor;
}
public function setTitlePositionHeldByTutor(?string $title_position_held_by_tutor): self
{
$this->title_position_held_by_tutor = $title_position_held_by_tutor;
return $this;
}
public function getCollectiveAgreementLevel(): ?string
{
return $this->collective_agreement_level;
}
public function setCollectiveAgreementLevel(?string $collective_agreement_level): self
{
$this->collective_agreement_level = $collective_agreement_level;
return $this;
}
public function getCollectiveAgreementHierarchicalCoefficient(): ?string
{
return $this->collective_agreement_hierarchical_coefficient;
}
public function setCollectiveAgreementHierarchicalCoefficient(?string $collective_agreement_hierarchical_coefficient): self
{
$this->collective_agreement_hierarchical_coefficient = $collective_agreement_hierarchical_coefficient;
return $this;
}
public function getTrialPeriodDuration(): ?string
{
return $this->trial_period_duration;
}
public function setTrialPeriodDuration(?string $trial_period_duration): self
{
$this->trial_period_duration = $trial_period_duration;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function isIsArchived(): ?bool
{
return $this->isArchived;
}
public function setIsArchived(?bool $isArchived): self
{
$this->isArchived = $isArchived;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): self
{
$this->token = $token;
return $this;
}
public function getSetBy(): ?string
{
return $this->setBy;
}
public function setSetBy(?string $setBy): self
{
$this->setBy = $setBy;
return $this;
}
/**
* @return Collection<int, ObjectiveContract>
*/
public function getObjectiveContracts(): Collection
{
return $this->objectiveContracts;
}
public function addObjectiveContract(ObjectiveContract $objectiveContract): self
{
$this->objectiveContracts->add($objectiveContract);
$objectiveContract->addCommitment($this);
return $this;
}
public function removeObjectiveContract(ObjectiveContract $objectiveContract): self
{
if ($this->objectiveContracts->removeElement($objectiveContract)) {
$objectiveContract->removeCommitment($this);
}
return $this;
}
/**
* @return Collection<int, CommitmentComment>
*/
public function getCommitmentComments(): Collection
{
return $this->commitmentComments;
}
public function addCommitmentComment(CommitmentComment $commitmentComment): self
{
if (!$this->commitmentComments->contains($commitmentComment)) {
$this->commitmentComments->add($commitmentComment);
$commitmentComment->setCommitment($this);
}
return $this;
}
public function removeCommitmentComment(CommitmentComment $commitmentComment): self
{
if ($this->commitmentComments->removeElement($commitmentComment)) {
// set the owning side to null (unless already changed)
if ($commitmentComment->getCommitment() === $this) {
$commitmentComment->setCommitment(null);
}
}
return $this;
}
public function getUserName(): ?string
{
return $this->user_name;
}
public function setUserName(?string $user_name): self
{
$this->user_name = $user_name;
return $this;
}
public function getUserLastname(): ?string
{
return $this->user_lastname;
}
public function setUserLastname(?string $user_lastname): self
{
$this->user_lastname = $user_lastname;
return $this;
}
public function getUserPhone(): ?string
{
return $this->user_phone;
}
public function setUserPhone(?string $user_phone): self
{
$this->user_phone = $user_phone;
return $this;
}
public function getUserEmail(): ?string
{
return $this->user_email;
}
public function setUserEmail(?string $user_email): self
{
$this->user_email = $user_email;
return $this;
}
}