src/V4/Model/Company/Company.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\V4\Model\Company;
  3. use App\Model\IriNormalizableInterface;
  4. use App\Model\NormalizeAsIRITrait;
  5. use App\Model\Traits\BlamableTrait;
  6. use App\Model\Traits\ImportableObjectTrait;
  7. use App\Model\Traits\TimestampableTrait;
  8. use App\V4\Model\LegalForm\LegalForm;
  9. use App\V4\Model\Naf\Naf;
  10. use App\V4\Model\Params\Params;
  11. use App\V4\Model\Prospect\Prospect;
  12. use App\V4\Model\StructureType\StructureType;
  13. use App\V4\Model\Workforce\Workforce;
  14. use DateTimeInterface;
  15. use Symfony\Component\Serializer\Annotation\Groups;
  16. use Symfony\Component\Validator\Constraints as Assert;
  17. class Company implements IriNormalizableInterface
  18. {
  19.     use TimestampableTrait;
  20.     use BlamableTrait;
  21.     use ImportableObjectTrait;
  22.     use NormalizeAsIRITrait;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @Groups({
  27.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  28.      * })
  29.      */
  30.     private $id;
  31.     /**
  32.      * @var string|null
  33.      */
  34.     private $customerId;
  35.     /**
  36.      * @var Prospect|null
  37.      */
  38.     private $prospect;
  39.     /**
  40.      * @var string|null
  41.      *
  42.      * @Groups({
  43.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  44.      * })
  45.      * @Assert\NotBlank(
  46.      *     message="Ce champs ne peut pas ĂȘtre vide"
  47.      * )
  48.      */
  49.     private $name;
  50.     /**
  51.      * @var Naf|null
  52.      *
  53.      * @Groups({
  54.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  55.      * })
  56.      */
  57.     private $naf;
  58.     /**
  59.      * @var LegalForm|null
  60.      *
  61.      * @Groups({
  62.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  63.      * })
  64.      */
  65.     private $legalForm;
  66.     /**
  67.      * @var string|null
  68.      *
  69.      * @Groups({
  70.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  71.      * })
  72.      */
  73.     private $siret;
  74.     /**
  75.      * @var string|null
  76.      *
  77.      * @Groups({
  78.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  79.      * })
  80.      */
  81.     private $webSite;
  82.     /**
  83.      * @var string|null
  84.      *
  85.      * @Groups({
  86.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  87.      * })
  88.      */
  89.     private $turnover;
  90.     /**
  91.      * @var DateTimeInterface|null
  92.      *
  93.      * @Groups({
  94.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  95.      * })
  96.      */
  97.     private $creationYear;
  98.     /**
  99.      * @var string|null
  100.      *
  101.      * @Groups({
  102.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  103.      * })
  104.      */
  105.     private $nameComplement;
  106.     /**
  107.      * @var string|null
  108.      *
  109.      * @Groups({
  110.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  111.      * })
  112.      */
  113.     private $socialCapital;
  114.     /**
  115.      * @var StructureType|null
  116.      *
  117.      * @Groups({
  118.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  119.      * })
  120.      */
  121.     private $structureType;
  122.     /**
  123.      * @var Workforce|null
  124.      *
  125.      * @Groups({
  126.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update"
  127.      * })
  128.      */
  129.     private $workforce;
  130.     /**
  131.      * @return string|null
  132.      */
  133.     public function getId(): ?string
  134.     {
  135.         return $this->id;
  136.     }
  137.     /**
  138.      * @param string|null $id
  139.      *
  140.      * @return $this
  141.      */
  142.     public function setId(?string $id): self
  143.     {
  144.         $this->id $id;
  145.         return $this;
  146.     }
  147.     /**
  148.      * @return string|null
  149.      */
  150.     public function getCustomerId(): ?string
  151.     {
  152.         return $this->customerId;
  153.     }
  154.     /**
  155.      * @return string|null
  156.      */
  157.     public function getWebSite(): ?string
  158.     {
  159.         return $this->webSite;
  160.     }
  161.     /**
  162.      * @param mixed $webSite
  163.      *
  164.      * @return Company
  165.      */
  166.     public function setWebSite(?string $webSite)
  167.     {
  168.         $this->webSite $webSite;
  169.         return $this;
  170.     }
  171.     /**
  172.      * @return DateTimeInterface|null
  173.      */
  174.     public function getCreationYear(): ?DateTimeInterface
  175.     {
  176.         return $this->creationYear;
  177.     }
  178.     /**
  179.      * @param DateTimeInterface|null $creationYear
  180.      *
  181.      * @return Company
  182.      *
  183.      * @throws \Exception
  184.      */
  185.     public function setCreationYear(?DateTimeInterface $creationYear): Company
  186.     {
  187.         $this->creationYear $creationYear;
  188.         return $this;
  189.     }
  190.     /**
  191.      * @param string|null $customerId
  192.      *
  193.      * @return $this
  194.      */
  195.     public function setCustomerId(?string $customerId): self
  196.     {
  197.         $this->customerId $customerId;
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return Prospect|null
  202.      */
  203.     public function getProspect(): ?Prospect
  204.     {
  205.         return $this->prospect;
  206.     }
  207.     /**
  208.      * @param Prospect|null $prospect
  209.      *
  210.      * @return $this
  211.      */
  212.     public function setProspect(?Prospect $prospect): self
  213.     {
  214.         $this->prospect $prospect;
  215.         return $this;
  216.     }
  217.     /**
  218.      * @return string|null
  219.      *
  220.      * @Groups({"list", "read", "read_prospect"})
  221.      */
  222.     public function getName(): ?string
  223.     {
  224.         return $this->name;
  225.     }
  226.     /**
  227.      * @param string|null $name
  228.      *
  229.      * @return $this
  230.      */
  231.     public function setName(?string $name): self
  232.     {
  233.         $this->name $name;
  234.         return $this;
  235.     }
  236.     /**
  237.      * @return string|null
  238.      */
  239.     public function getSiret(): ?string
  240.     {
  241.         return $this->siret;
  242.     }
  243.     /**
  244.      * @param string|null $siret
  245.      *
  246.      * @return $this
  247.      */
  248.     public function setSiret(?string $siret): self
  249.     {
  250.         $this->siret $siret;
  251.         return $this;
  252.     }
  253.     /**
  254.      * @return StructureType|null
  255.      */
  256.     public function getStructureType(): ?Params
  257.     {
  258.         return $this->structureType;
  259.     }
  260.     /**
  261.      * @param Params|null $structureType
  262.      *
  263.      * @return $this
  264.      */
  265.     public function setStructureType(?Params $structureType): self
  266.     {
  267.         $this->structureType $structureType;
  268.         return $this;
  269.     }
  270.     /**
  271.      * @return string|null
  272.      */
  273.     public function getNameComplement(): ?string
  274.     {
  275.         return $this->nameComplement;
  276.     }
  277.     /**
  278.      * @param string|null $nameComplement
  279.      *
  280.      * @return Company
  281.      */
  282.     public function setNameComplement(?string $nameComplement): Company
  283.     {
  284.         $this->nameComplement $nameComplement;
  285.         return $this;
  286.     }
  287.     /**
  288.      * @return string|null
  289.      */
  290.     public function getSocialCapital(): ?string
  291.     {
  292.         return $this->socialCapital;
  293.     }
  294.     /**
  295.      * @param string|null $socialCapital
  296.      *
  297.      * @return Company
  298.      */
  299.     public function setSocialCapital(?string $socialCapital): Company
  300.     {
  301.         $this->socialCapital $socialCapital;
  302.         return $this;
  303.     }
  304.     /**
  305.      * @return string|null
  306.      */
  307.     public function getTurnover(): ?string
  308.     {
  309.         return $this->turnover;
  310.     }
  311.     /**
  312.      * @param string|null $turnover
  313.      *
  314.      * @return Company
  315.      */
  316.     public function setTurnover(?string $turnover): Company
  317.     {
  318.         $this->turnover $turnover;
  319.         return $this;
  320.     }
  321.     /**
  322.      * @return Workforce|null
  323.      */
  324.     public function getWorkforce(): ?Params
  325.     {
  326.         return $this->workforce;
  327.     }
  328.     /**
  329.      * @param Params|null $workforce
  330.      *
  331.      * @return Company
  332.      */
  333.     public function setWorkforce(?Params $workforce): Company
  334.     {
  335.         $this->workforce $workforce;
  336.         return $this;
  337.     }
  338.     /**
  339.      * @return Naf|null
  340.      */
  341.     public function getNaf(): ?Naf
  342.     {
  343.         return $this->naf;
  344.     }
  345.     /**
  346.      * @param Naf|null $naf
  347.      *
  348.      * @return Company
  349.      */
  350.     public function setNaf(?Naf $naf): Company
  351.     {
  352.         $this->naf $naf;
  353.         return $this;
  354.     }
  355.     /**
  356.      * @return LegalForm|null
  357.      */
  358.     public function getLegalForm(): ?Params
  359.     {
  360.         return $this->legalForm;
  361.     }
  362.     /**
  363.      * @param Params|null $legalForm
  364.      *
  365.      * @return Company
  366.      */
  367.     public function setLegalForm(?Params $legalForm): Company
  368.     {
  369.         $this->legalForm $legalForm;
  370.         return $this;
  371.     }
  372. }