src/Entity/Subcontractor.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * Subcontractor
  7.  *
  8.  * @ORM\Table(name="subcontractor", uniqueConstraints={@ORM\UniqueConstraint(name="subcontractor_id_uindex", columns={"id"})}, indexes={@ORM\Index(name="subcontractor_user_id_fk", columns={"user_id"}), @ORM\Index(name="subcontractor_conformity_id_fk", columns={"conformity_id"})})
  9.  * @ORM\Entity(repositoryClass="App\Repository\SubcontractorRepository")
  10.  * @Gedmo\Loggable
  11.  */
  12. class Subcontractor
  13. {
  14.     /**
  15.      * @var integer
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  26.      * @Gedmo\Versioned
  27.      */
  28.     private $name;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="type", type="string", length=255, nullable=true)
  33.      * @Gedmo\Versioned
  34.      */
  35.     private $type;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="contact_first_name", type="string", length=255, nullable=true)
  40.      * @Gedmo\Versioned
  41.      */
  42.     private $contactFirstName;
  43.     /**
  44.      * @var string
  45.      *
  46.      * @ORM\Column(name="contact_last_name", type="string", length=255, nullable=true)
  47.      * @Gedmo\Versioned
  48.      */
  49.     private $contactLastName;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(name="contact_phone", type="string", length=255, nullable=true)
  54.      * @Gedmo\Versioned
  55.      */
  56.     private $contactPhone;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="contact_email", type="string", length=255, nullable=true)
  61.      * @Gedmo\Versioned
  62.      */
  63.     private $contactEmail;
  64.     /**
  65.      * @var string
  66.      *
  67.      * @ORM\Column(name="privacy_policy_link", type="string", length=255, nullable=true)
  68.      * @Gedmo\Versioned
  69.      */
  70.     private $privacyPolicyLink;
  71.     /**
  72.      * @var \DateTime
  73.      *
  74.      * @ORM\Column(name="date", type="datetime", nullable=true)
  75.      */
  76.     private $date;
  77.     /**
  78.      * @var \DateTime
  79.      *
  80.      * @ORM\Column(name="edit_date", type="datetime", nullable=true)
  81.      * @Gedmo\Versioned
  82.      */
  83.     private $editDate;
  84.     /**
  85.      * @var boolean
  86.      *
  87.      * @ORM\Column(name="`group`", type="boolean", nullable=true)
  88.      * @Gedmo\Versioned
  89.      */
  90.     private $group false;
  91.     /**
  92.      * @var Conformity
  93.      *
  94.      * @ORM\ManyToOne(targetEntity="Conformity")
  95.      * @ORM\JoinColumns({
  96.      *   @ORM\JoinColumn(name="conformity_id", referencedColumnName="id")
  97.      * })
  98.      * @Gedmo\Versioned
  99.      */
  100.     private $conformity;
  101.     /**
  102.      * @var User
  103.      *
  104.      * @ORM\ManyToOne(targetEntity="User")
  105.      * @ORM\JoinColumns({
  106.      *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  107.      * })
  108.      */
  109.     private $user;
  110.     /**
  111.      * @var SubcontractorType
  112.      *
  113.      * @ORM\ManyToOne(targetEntity="SubcontractorType")
  114.      * @ORM\JoinColumns({
  115.      *   @ORM\JoinColumn(name="type_id", referencedColumnName="id")
  116.      * })
  117.      */
  118.     private $subcontractorType;
  119.     /**
  120.      * @var \Doctrine\Common\Collections\Collection
  121.      *
  122.      * @ORM\OneToMany(targetEntity="UserDocument", mappedBy="subcontractor")
  123.      */
  124.     private $documents;
  125.     /**
  126.      * @var \Doctrine\Common\Collections\Collection
  127.      *
  128.      * @ORM\ManyToMany(targetEntity="Treatment", mappedBy="subcontractors")
  129.      */
  130.     private $treatments;
  131.     /**
  132.      * Constructor
  133.      */
  134.     public function __construct()
  135.     {
  136.         $this->documents = new \Doctrine\Common\Collections\ArrayCollection();
  137.         $this->treatments = new \Doctrine\Common\Collections\ArrayCollection();
  138.     }
  139.     /**
  140.      * @return int
  141.      */
  142.     public function getId()
  143.     {
  144.         return $this->id;
  145.     }
  146.     /**
  147.      * @param int $id
  148.      */
  149.     public function setId($id)
  150.     {
  151.         $this->id $id;
  152.     }
  153.     /**
  154.      * @return string
  155.      */
  156.     public function getName()
  157.     {
  158.         return $this->name;
  159.     }
  160.     /**
  161.      * @param string $name
  162.      */
  163.     public function setName($name)
  164.     {
  165.         $this->name $name;
  166.     }
  167.     /**
  168.      * @return string
  169.      */
  170.     public function getType()
  171.     {
  172.         return $this->type;
  173.     }
  174.     /**
  175.      * @param string $type
  176.      */
  177.     public function setType($type)
  178.     {
  179.         $this->type $type;
  180.     }
  181.     /**
  182.      * @return string
  183.      */
  184.     public function getContactFirstName()
  185.     {
  186.         return $this->contactFirstName;
  187.     }
  188.     /**
  189.      * @param string $contactFirstName
  190.      */
  191.     public function setContactFirstName($contactFirstName)
  192.     {
  193.         $this->contactFirstName $contactFirstName;
  194.     }
  195.     /**
  196.      * @return string
  197.      */
  198.     public function getContactLastName()
  199.     {
  200.         return $this->contactLastName;
  201.     }
  202.     /**
  203.      * @param string $contactLastName
  204.      */
  205.     public function setContactLastName($contactLastName)
  206.     {
  207.         $this->contactLastName $contactLastName;
  208.     }
  209.     /**
  210.      * @return string
  211.      */
  212.     public function getContactPhone()
  213.     {
  214.         return $this->contactPhone;
  215.     }
  216.     /**
  217.      * @param string $contactPhone
  218.      */
  219.     public function setContactPhone($contactPhone)
  220.     {
  221.         $this->contactPhone $contactPhone;
  222.     }
  223.     /**
  224.      * @return string
  225.      */
  226.     public function getContactEmail()
  227.     {
  228.         return $this->contactEmail;
  229.     }
  230.     /**
  231.      * @param string $contactEmail
  232.      */
  233.     public function setContactEmail($contactEmail)
  234.     {
  235.         $this->contactEmail $contactEmail;
  236.     }
  237.     /**
  238.      * @return string
  239.      */
  240.     public function getPrivacyPolicyLink()
  241.     {
  242.         return $this->privacyPolicyLink;
  243.     }
  244.     /**
  245.      * @param string $privacyPolicyLink
  246.      */
  247.     public function setPrivacyPolicyLink($privacyPolicyLink)
  248.     {
  249.         $this->privacyPolicyLink $privacyPolicyLink;
  250.     }
  251.     /**
  252.      * @return \DateTime
  253.      */
  254.     public function getDate()
  255.     {
  256.         return $this->date;
  257.     }
  258.     /**
  259.      * @param \DateTime $date
  260.      */
  261.     public function setDate($date)
  262.     {
  263.         $this->date $date;
  264.     }
  265.     /**
  266.      * @return \DateTime
  267.      */
  268.     public function getEditDate()
  269.     {
  270.         return $this->editDate;
  271.     }
  272.     /**
  273.      * @param \DateTime $editDate
  274.      */
  275.     public function setEditDate($editDate)
  276.     {
  277.         $this->editDate $editDate;
  278.     }
  279.     /**
  280.      * @return bool
  281.      */
  282.     public function isGroup()
  283.     {
  284.         return $this->group;
  285.     }
  286.     /**
  287.      * @param bool $group
  288.      */
  289.     public function setGroup($group)
  290.     {
  291.         $this->group $group;
  292.     }
  293.     /**
  294.      * @return Conformity
  295.      */
  296.     public function getConformity()
  297.     {
  298.         return $this->conformity;
  299.     }
  300.     /**
  301.      * @param Conformity $conformity
  302.      */
  303.     public function setConformity($conformity)
  304.     {
  305.         $this->conformity $conformity;
  306.     }
  307.     /**
  308.      * @return User
  309.      */
  310.     public function getUser()
  311.     {
  312.         return $this->user;
  313.     }
  314.     /**
  315.      * @param User $user
  316.      */
  317.     public function setUser($user)
  318.     {
  319.         $this->user $user;
  320.     }
  321.     /**
  322.      * @return SubcontractorType
  323.      */
  324.     public function getSubcontractorType()
  325.     {
  326.         return $this->subcontractorType;
  327.     }
  328.     /**
  329.      * @param SubcontractorType $subcontractorType
  330.      */
  331.     public function setSubcontractorType(SubcontractorType $subcontractorType)
  332.     {
  333.         $this->subcontractorType $subcontractorType;
  334.     }
  335.     /**
  336.      * @return \Doctrine\Common\Collections\Collection
  337.      */
  338.     public function getDocuments()
  339.     {
  340.         return $this->documents;
  341.     }
  342.     /**
  343.      * @param \Doctrine\Common\Collections\Collection $documents
  344.      */
  345.     public function setDocuments($documents)
  346.     {
  347.         $this->documents $documents;
  348.     }
  349.     /**
  350.      * @return \Doctrine\Common\Collections\Collection
  351.      */
  352.     public function getTreatments()
  353.     {
  354.         return $this->treatments;
  355.     }
  356.     /**
  357.      * @param \Doctrine\Common\Collections\Collection $treatments
  358.      */
  359.     public function setTreatments($treatments)
  360.     {
  361.         $this->treatments $treatments;
  362.     }
  363. }