src/Entity/Contract.php line 83

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use ApiPlatform\Core\Annotation\ApiFilter;
  5. use ApiPlatform\Core\Annotation\ApiProperty;
  6. use ApiPlatform\Core\Annotation\ApiResource;
  7. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
  8. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  9. use App\Trait\TimestampableEntity;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. use Symfony\Component\Serializer\Annotation\Groups;
  15. use Symfony\Component\Serializer\Annotation\MaxDepth;
  16. use Ramsey\Uuid\Uuid;
  17. use Ramsey\Uuid\UuidInterface;
  18. /**
  19.  * @see https://schema.org/Thing
  20.  *
  21.  * @author Jordi Fernandes Alves <jfadev@gmail.com>
  22.  */
  23. #[ORM\Entity]
  24. #[ApiResource(
  25.     iri'Contract',
  26.     itemOperations: [
  27.         'get' => ['normalization_context' => ['groups' => 'contract:item:get''enable_max_depth' => true]],
  28.         'put' => [
  29.             'normalization_context' => ['groups' => 'contract:item:put''enable_max_depth' => true],
  30.             'denormalization_context' => ['groups' => 'contract:item:put''enable_max_depth' => true],
  31.         ],
  32.         'delete' => [],
  33.     ],
  34.     collectionOperations: [
  35.         'get' => [
  36.             'normalization_context' => [
  37.                 'groups' => ['contract:collection:get''createdAt'],
  38.                 'enable_max_depth' => true,
  39.             ],
  40.         ],
  41.         'post' => [
  42.             'normalization_context' => ['groups' => 'contract:collection:post''enable_max_depth' => true],
  43.             'denormalization_context' => ['groups' => 'contract:collection:post''enable_max_depth' => true],
  44.         ],
  45.     ],
  46. )]
  47. #[ApiFilter(
  48.     SearchFilter::class,
  49.     properties: [
  50.         'contractNumber' => 'start',
  51.         'contractType' => 'exact',
  52.         'vessel.vesselName' => 'partial',
  53.         'charterer.companyName' => 'partial',
  54.         'owner.companyName' => 'partial',
  55.         'broker.name' => 'partial',
  56.         'operator.name' => 'partial',
  57.         'laycanStart' => 'start',
  58.         'laycanEnd' => 'start',
  59.         'status' => 'exact',
  60.         'createdAt' => 'start'
  61.     ],
  62. )]
  63. #[ApiFilter(
  64.     OrderFilter::class,
  65.     properties: [
  66.         'contractNumber',
  67.         'contractType',
  68.         'vessel.vesselName',
  69.         'charterer.companyName',
  70.         'owner.companyName',
  71.         'broker.name',
  72.         'operator.name',
  73.         'laycanStart',
  74.         'laycanEnd',
  75.         'status',
  76.         'createdAt'
  77.     ],
  78. )]
  79. class Contract
  80. {
  81.     use TimestampableEntity;
  82.     public const COST_TYPES = [
  83.         'PMT',
  84.         'LUMPSUM'
  85.     ];
  86.     
  87.     #[ORM\Id]
  88.     #[ORM\GeneratedValue(strategy'NONE')]
  89.     #[ORM\Column(type'uuid'uniquetrue)]
  90.     private ?UuidInterface $id null;
  91.     #[ORM\Column(type'string'nullablefalseuniquetrue)]
  92.     #[ApiProperty(iri'https://schema.org/contractNumber')]
  93.     #[Assert\NotBlank]
  94.     #[Assert\Type('string')]
  95.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  96.     private ?string $contractNumber null;
  97.     #[ORM\Column(type'date'nullabletrue)]
  98.     #[ApiProperty(iri'https://schema.org/contractDate')]
  99.     // #[Assert\NotBlank]
  100.     #[Assert\Type(\DateTimeInterface::class)]
  101.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  102.     private ?\DateTimeInterface $contractDate null;
  103.     #[ORM\Column(type'string'nullabletrue)]
  104.     #[ApiProperty(iri'https://schema.org/contractType')]
  105.     #[Assert\NotBlank]
  106.     #[Assert\Type('string')]
  107.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  108.     private ?string $contractType null;
  109.     #[ORM\Column(type'datetime'nullabletrue)]
  110.     #[ApiProperty(iri'https://schema.org/laycanStart')]
  111.     // #[Assert\NotBlank]
  112.     #[Assert\Type(\DateTimeInterface::class)]
  113.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  114.     private ?\DateTimeInterface $laycanStart null;
  115.     #[ApiProperty(iri'https://schema.org/laycanStartDate')]
  116.     #[Groups(['contract:item:get'])]
  117.     private ?string $laycanStartDate null;
  118.     #[ApiProperty(iri'https://schema.org/laycanStartTime')]
  119.     #[Groups(['contract:item:get'])]
  120.     private ?string $laycanStartTime null;
  121.     #[ORM\Column(type'datetime'nullabletrue)]
  122.     #[ApiProperty(iri'https://schema.org/laycanEnd')]
  123.     // #[Assert\NotBlank]
  124.     #[Assert\Type(\DateTimeInterface::class)]
  125.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  126.     private ?\DateTimeInterface $laycanEnd null;
  127.     #[ApiProperty(iri'https://schema.org/laycanEndDate')]
  128.     #[Groups(['contract:item:get'])]
  129.     private ?string $laycanEndDate null;
  130.     #[ApiProperty(iri'https://schema.org/laycanEndTime')]
  131.     #[Groups(['contract:item:get'])]
  132.     private ?string $laycanEndTime null;
  133.     #[ORM\ManyToOne(targetEntity'App\Entity\Vessel'inversedBy'contracts')]
  134.     #[ORM\JoinColumn(nullabletrue)]
  135.     #[ApiProperty(iri'https://schema.org/vessel')]
  136.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  137.     private ?Vessel $vessel null;
  138.     #[ORM\ManyToOne(targetEntity'App\Entity\Owner'inversedBy'contracts')]
  139.     #[ORM\JoinColumn(nullabletrue)]
  140.     #[ApiProperty(iri'https://schema.org/Owner')]
  141.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  142.     #[MaxDepth(1)]
  143.     private ?Owner $owner null;
  144.     #[ORM\ManyToOne(targetEntity'App\Entity\Charterer'inversedBy'contracts')]
  145.     #[ORM\JoinColumn(nullabletrue)]
  146.     #[ApiProperty(iri'https://schema.org/Charterer')]
  147.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  148.     #[MaxDepth(1)]
  149.     private ?Charterer $charterer null;
  150.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'contracts')]
  151.     #[ORM\JoinColumn(nullabletrue)]
  152.     #[ApiProperty(iri'https://schema.org/broker')]
  153.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  154.     #[MaxDepth(1)]
  155.     private ?User $broker null;
  156.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'operations')]
  157.     #[ORM\JoinColumn(nullabletrue)]
  158.     #[ApiProperty(iri'https://schema.org/operator')]
  159.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  160.     #[MaxDepth(1)]
  161.     private ?User $operator null;
  162.     #[ORM\Column(type'string'nullablefalse)]
  163.     #[ApiProperty(iri'https://schema.org/status')]
  164.     #[Assert\NotBlank]
  165.     #[Assert\Type('string')]
  166.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  167.     private ?string $status null;
  168.     #[ORM\Column(type'string'nullabletrue)]
  169.     #[Assert\Type('string')]
  170.     #[ApiProperty(iri'https://schema.org/freightCost')]
  171.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  172.     private ?string $freightCost null;
  173.     #[ORM\Column(type'string'nullabletrue)]
  174.     #[Assert\Type('string')]
  175.     #[ApiProperty(iri'https://schema.org/currency')]
  176.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  177.     private ?string $freightCostCurrency null;
  178.     #[ORM\Column(type'string'nullabletrue)]
  179.     #[Assert\Type('string')]
  180.     #[Assert\Choice(choicesself::COST_TYPESmessage'The type is not valid.')]
  181.     #[ApiProperty(iri'https://schema.org/freightType')]
  182.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  183.     private ?string $freightType null;
  184.     #[ORM\Column(type'string'nullabletrue)]
  185.     #[Assert\Type('string')]
  186.     #[ApiProperty(iri'https://schema.org/demurragePerDay')]
  187.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  188.     private ?string $demurragePerDay null;
  189.     #[ORM\Column(type'string'nullabletrue)]
  190.     #[Assert\Type('string')]
  191.     #[ApiProperty(iri'https://schema.org/currency')]
  192.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  193.     private ?string $demurragePerDayCurrency null;
  194.     #[ORM\OneToMany(targetEntity'App\Entity\AdditionalCost'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  195.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  196.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  197.     #[MaxDepth(1)]
  198.     private ?Collection $additionalCosts null;
  199.     #[ORM\Column(type'string'nullabletrue)]
  200.     #[Assert\Type('string')]
  201.     #[ApiProperty(iri'https://schema.org/addressCommission')]
  202.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  203.     private ?string $addressCommission null;
  204.     #[ORM\Column(type'string'nullabletrue)]
  205.     #[Assert\Type('string')]
  206.     #[ApiProperty(iri'https://schema.org/brokerageCommission')]
  207.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  208.     private ?string $brokerageCommission null;
  209.     #[ORM\Column(type'integer'nullabletrue)]
  210.     #[ApiProperty(iri'https://schema.org/liftingsMin')]
  211.     #[Assert\Type('integer')]
  212.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  213.     private ?int $liftingsMin null;
  214.     #[ORM\Column(type'integer'nullabletrue)]
  215.     #[ApiProperty(iri'https://schema.org/liftingsMax')]
  216.     #[Assert\Type('integer')]
  217.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  218.     private ?int $liftingsMax null;
  219.     #[ORM\OneToMany(mappedBy'contract'targetEntityMedia::class, cascade: ["remove"], orphanRemovaltrue)]
  220.     #[ApiProperty(iri'https://schema.org/documents')]
  221.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  222.     #[MaxDepth(1)]
  223.     private ?Collection $documents null;
  224.     #[ORM\OneToMany(targetEntity'App\Entity\PortCall'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  225.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  226.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  227.     #[MaxDepth(1)]
  228.     private ?Collection $portCalls null;
  229.     #[ORM\OneToMany(targetEntity'App\Entity\ReportedPort'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  230.     // #[ORM\OrderBy(['taskIndex' => 'ASC'])]
  231.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  232.     #[MaxDepth(1)]
  233.     private ?Collection $reportedPorts null;
  234.     #[ORM\OneToMany(targetEntity'App\Entity\ReportedIncident'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  235.     // #[ORM\OrderBy(['taskIndex' => 'ASC'])]
  236.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  237.     #[MaxDepth(1)]
  238.     private ?Collection $reportedIncidents null;
  239.     #[ORM\OneToMany(targetEntity'App\Entity\ContractCargo'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  240.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  241.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  242.     #[MaxDepth(1)]
  243.     private ?Collection $cargoItems null;
  244.     #[ORM\OneToMany(targetEntity'App\Entity\Payment'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  245.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  246.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  247.     #[MaxDepth(1)]
  248.     private ?Collection $payments null;
  249.     #[ORM\OneToMany(targetEntity'App\Entity\Hire'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  250.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  251.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  252.     #[MaxDepth(1)]
  253.     private ?Collection $hires null;
  254.     // #[ORM\OneToMany(targetEntity: 'App\Entity\Lifting', mappedBy: 'contract', cascade: ['persist', 'remove'], orphanRemoval: true)]
  255.     // ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  256.     // #[Groups(['contract:collection:get', 'contract:collection:post', 'contract:item:get', 'contract:item:put'])]
  257.     // #[MaxDepth(1)]
  258.     // private ?Collection $liftings = null;
  259.     #[ORM\OneToMany(targetEntity'App\Entity\Contract'mappedBy'contractCoa'cascade: ['persist''remove'], orphanRemovaltrue)]
  260.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  261.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  262.     #[MaxDepth(2)]
  263.     private ?Collection $liftings null;
  264.     #[ORM\ManyToOne(targetEntity'App\Entity\Checklist'inversedBy'contracts')]
  265.     #[ORM\JoinColumn(nullabletrue)]
  266.     #[ApiProperty(iri'https://schema.org/Checklist')]
  267.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  268.     #[MaxDepth(1)]
  269.     private ?Checklist $checklist null;
  270.     #[ORM\ManyToMany(targetEntity'App\Entity\Task')]
  271.     #[ORM\InverseJoinColumn(uniquetrue)]
  272.     #[ApiProperty(iri'https://schema.org/checkedTasks')]
  273.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  274.     #[MaxDepth(1)]
  275.     private ?Collection $checkedTasks null;
  276.     #[ORM\Column(type'text'nullabletrue)]
  277.     #[ApiProperty(iri'https://schema.org/observation')]
  278.     #[Assert\Type('string')]
  279.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  280.     private ?string $checklistNotes null;
  281.     #[ORM\Column(type'string'nullabletrue)]
  282.     #[ApiProperty(iri'https://schema.org/demurrageStatus')]
  283.     // #[Assert\NotBlank]
  284.     #[Assert\Type('string')]
  285.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  286.     private ?string $demurrageStatus null;
  287.     #[ORM\Column(type'integer'nullabletrue)]
  288.     #[ApiProperty(iri'https://schema.org/demurrageTimeBar')]
  289.     #[Assert\Type('integer')]
  290.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  291.     private ?int $demurrageTimeBar null;
  292.     #[ORM\Column(type'date'nullabletrue)]
  293.     #[ApiProperty(iri'https://schema.org/demurragePaymentDate')]
  294.     // #[Assert\NotBlank]
  295.     #[Assert\Type(\DateTimeInterface::class)]
  296.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  297.     private ?\DateTimeInterface $demurragePaymentDate null;
  298.     #[ORM\Column(type'string'nullabletrue)]
  299.     #[Assert\Type('string')]
  300.     #[ApiProperty(iri'https://schema.org/finalDemurrageCost')]
  301.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  302.     private ?string $finalDemurrageCost null;
  303.     #[ORM\Column(type'string'nullabletrue)]
  304.     #[Assert\Type('string')]
  305.     #[ApiProperty(iri'https://schema.org/currency')]
  306.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  307.     private ?string $finalDemurrageCostCurrency null;
  308.     #[ORM\Column(type'string'nullabletrue)]
  309.     #[Assert\Type('string')]
  310.     #[ApiProperty(iri'https://schema.org/demurragePaidByCharterer')]
  311.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  312.     private ?string $demurragePaidByCharterer null;
  313.     #[ORM\Column(type'string'nullabletrue)]
  314.     #[Assert\Type('string')]
  315.     #[ApiProperty(iri'https://schema.org/currency')]
  316.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  317.     private ?string $demurragePaidByChartererCurrency null;
  318.     #[ORM\Column(type'datetime'nullabletrue)]
  319.     #[ApiProperty(iri'https://schema.org/etaArrival')]
  320.     // #[Assert\NotBlank]
  321.     #[Assert\Type(\DateTimeInterface::class)]
  322.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  323.     private ?\DateTimeInterface $etaArrival null;
  324.     #[ApiProperty(iri'https://schema.org/etaArrivalDate')]
  325.     #[Groups(['contract:item:get'])]
  326.     private ?string $etaArrivalDate null;
  327.     #[ApiProperty(iri'https://schema.org/etaArrivalTime')]
  328.     #[Groups(['contract:item:get'])]
  329.     private ?string $etaArrivalTime null;
  330.     #[ORM\Column(type'datetime'nullabletrue)]
  331.     #[ApiProperty(iri'https://schema.org/deliveredArrival')]
  332.     // #[Assert\NotBlank]
  333.     #[Assert\Type(\DateTimeInterface::class)]
  334.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  335.     private ?\DateTimeInterface $deliveredArrival null;
  336.     #[ApiProperty(iri'https://schema.org/deliveredArrivalDate')]
  337.     #[Groups(['contract:item:get'])]
  338.     private ?string $deliveredArrivalDate null;
  339.     #[ApiProperty(iri'https://schema.org/deliveredArrivalTime')]
  340.     #[Groups(['contract:item:get'])]
  341.     private ?string $deliveredArrivalTime null;
  342.     #[ORM\Column(type'integer'nullabletrue)]
  343.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice1')]
  344.     #[Assert\Type('integer')]
  345.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  346.     private ?int $deliveryAproxNotice1 null;
  347.     #[ORM\Column(type'integer'nullabletrue)]
  348.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice2')]
  349.     #[Assert\Type('integer')]
  350.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  351.     private ?int $deliveryAproxNotice2 null;
  352.     #[ORM\Column(type'integer'nullabletrue)]
  353.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice3')]
  354.     #[Assert\Type('integer')]
  355.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  356.     private ?int $deliveryAproxNotice3 null;
  357.     #[ORM\Column(type'integer'nullabletrue)]
  358.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice4')]
  359.     #[Assert\Type('integer')]
  360.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  361.     private ?int $deliveryAproxNotice4 null;
  362.     #[ORM\Column(type'integer'nullabletrue)]
  363.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice5')]
  364.     #[Assert\Type('integer')]
  365.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  366.     private ?int $deliveryAproxNotice5 null;
  367.     #[ORM\Column(type'integer'nullabletrue)]
  368.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice6')]
  369.     #[Assert\Type('integer')]
  370.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  371.     private ?int $deliveryAproxNotice6 null;
  372.     #[ORM\Column(type'integer'nullabletrue)]
  373.     #[ApiProperty(iri'https://schema.org/deliveryAproxNotice7')]
  374.     #[Assert\Type('integer')]
  375.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  376.     private ?int $deliveryAproxNotice7 null;
  377.     #[ORM\Column(type'integer'nullabletrue)]
  378.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice1')]
  379.     #[Assert\Type('integer')]
  380.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  381.     private ?int $deliveryFirmNotice1 null;
  382.     #[ORM\Column(type'integer'nullabletrue)]
  383.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice2')]
  384.     #[Assert\Type('integer')]
  385.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  386.     private ?int $deliveryFirmNotice2 null;
  387.     #[ORM\Column(type'integer'nullabletrue)]
  388.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice3')]
  389.     #[Assert\Type('integer')]
  390.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  391.     private ?int $deliveryFirmNotice3 null;
  392.     #[ORM\Column(type'integer'nullabletrue)]
  393.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice4')]
  394.     #[Assert\Type('integer')]
  395.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  396.     private ?int $deliveryFirmNotice4 null;
  397.     #[ORM\Column(type'integer'nullabletrue)]
  398.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice5')]
  399.     #[Assert\Type('integer')]
  400.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  401.     private ?int $deliveryFirmNotice5 null;
  402.     #[ORM\Column(type'integer'nullabletrue)]
  403.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice6')]
  404.     #[Assert\Type('integer')]
  405.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  406.     private ?int $deliveryFirmNotice6 null;
  407.     #[ORM\Column(type'integer'nullabletrue)]
  408.     #[ApiProperty(iri'https://schema.org/deliveryFirmNotice7')]
  409.     #[Assert\Type('integer')]
  410.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  411.     private ?int $deliveryFirmNotice7 null;
  412.     #[ORM\Column(type'boolean'nullabletrue)]
  413.     #[ApiProperty(iri'https://schema.org/deliveryNoticesNotAplicable')]
  414.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  415.     private ?bool $deliveryNoticesNotAplicable null;
  416.     #[ORM\Column(type'boolean'nullabletrue)]
  417.     #[ApiProperty(iri'https://schema.org/shipDelivered')]
  418.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  419.     private ?bool $shipDelivered null;
  420.     #[ORM\ManyToOne(targetEntity'App\Entity\Port'inversedBy'deliveryPorts1')]
  421.     #[ORM\JoinColumn(nullabletrue)]
  422.     #[ApiProperty(iri'https://schema.org/port')]
  423.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  424.     #[MaxDepth(1)]
  425.     private ?Port $deliveryPort1 null;
  426.     #[ORM\ManyToOne(targetEntity'App\Entity\Port'inversedBy'deliveryPorts2')]
  427.     #[ORM\JoinColumn(nullabletrue)]
  428.     #[ApiProperty(iri'https://schema.org/port')]
  429.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  430.     #[MaxDepth(1)]
  431.     private ?Port $deliveryPort2 null;
  432.     #[ORM\Column(type'string'nullabletrue)]
  433.     #[Assert\Type('string')]
  434.     #[ApiProperty(iri'https://schema.org/hirePerDay')]
  435.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  436.     private ?string $hirePerDay null;
  437.     #[ORM\Column(type'string'nullabletrue)]
  438.     #[Assert\Type('string')]
  439.     #[ApiProperty(iri'https://schema.org/currency')]
  440.     #[Groups(['contract:item:get''contract:item:put''contract:collection:get''contract:collection:post'])]
  441.     private ?string $hirePerDayCurrency null;
  442.     #[ORM\Column(type'integer'nullabletrue)]
  443.     #[ApiProperty(iri'https://schema.org/period')]
  444.     #[Assert\Type('integer')]
  445.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  446.     private ?int $period null;
  447.     #[ORM\OneToMany(targetEntity'App\Entity\DeliveryNotice'mappedBy'contract'cascade: ['persist''remove'], orphanRemovaltrue)]
  448.     ##[ORM\OrderBy(['taskIndex' => 'ASC'])]
  449.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  450.     #[MaxDepth(1)]
  451.     private ?Collection $deliveryNotices null;
  452.     #[ORM\Column(type'text'nullabletrue)]
  453.     #[ApiProperty(iri'https://schema.org/observation')]
  454.     #[Assert\Type('string')]
  455.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  456.     private ?string $reportDescription null;
  457.     #[ORM\Column(type'boolean'nullabletrue)]
  458.     #[ApiProperty(iri'https://schema.org/vesselArrivedWithinTheLaycan')]
  459.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  460.     private ?bool $vesselArrivedWithinTheLaycan false;
  461.     #[ORM\Column(type'boolean'nullabletrue)]
  462.     #[ApiProperty(iri'https://schema.org/vesselWasSubstituted')]
  463.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  464.     private ?bool $vesselWasSubstituted false;
  465.     #[ORM\Column(type'boolean'nullabletrue)]
  466.     #[ApiProperty(iri'https://schema.org/addendumIssued')]
  467.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  468.     private ?bool $addendumIssued false;
  469.     #[ORM\Column(type'text'nullabletrue)]
  470.     #[ApiProperty(iri'https://schema.org/observation')]
  471.     #[Assert\Type('string')]
  472.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  473.     private ?string $addendumDescription null;
  474.     #[ORM\ManyToOne(targetEntity'App\Entity\Contract'inversedBy'liftings')]
  475.     #[ORM\JoinColumn(nullabletrue)]
  476.     #[ApiProperty(iri'https://schema.org/Contract')]
  477.     #[Groups(['contract:collection:get''contract:collection:post''contract:item:get''contract:item:put'])]
  478.     #[MaxDepth(1)]
  479.     private ?Contract $contractCoa null;
  480.     #[ApiProperty(iri'https://schema.org/cargoVolumeM3')]
  481.     #[Groups(['contract:item:get'])]
  482.     private ?string $cargoVolumeM3 null;
  483.     #[ApiProperty(iri'https://schema.org/cargoVolumeMT')]
  484.     #[Groups(['contract:item:get'])]
  485.     private ?string $cargoVolumeMT null;
  486.     public function __construct()
  487.     {
  488.         $this->id Uuid::uuid4();
  489.         $this->documents = new ArrayCollection();
  490.         $this->portCalls = new ArrayCollection();
  491.         $this->reportedPorts = new ArrayCollection();
  492.         $this->reportedIncidents = new ArrayCollection();
  493.         $this->cargoItems = new ArrayCollection();
  494.         $this->checkedTasks = new ArrayCollection();
  495.         $this->payments = new ArrayCollection();
  496.         $this->hires = new ArrayCollection();
  497.         $this->liftings = new ArrayCollection();
  498.         $this->deliveryNotices = new ArrayCollection();
  499.     }
  500.     public function getId(): ?UuidInterface
  501.     {
  502.         return $this->id;
  503.     }
  504.     public function setContractNumber(?string $contractNumber): void
  505.     {
  506.         $this->contractNumber $contractNumber;
  507.     }
  508.     public function getContractNumber(): ?string
  509.     {
  510.         return $this->contractNumber;
  511.     }
  512.     public function setContractDate(?\DateTimeInterface $contractDate): void
  513.     {
  514.         $this->contractDate $contractDate;
  515.     }
  516.     public function getContractDate(): ?string
  517.     {
  518.         return $this->contractDate?->format('Y-m-d');
  519.     }
  520.     public function setContractType(?string $contractType): void
  521.     {
  522.         $this->contractType $contractType;
  523.     }
  524.     public function getContractType(): ?string
  525.     {
  526.         return $this->contractType;
  527.     }
  528.     public function setLaycanStart(?\DateTimeInterface $laycanStart): void
  529.     {
  530.         $this->laycanStart $laycanStart;
  531.     }
  532.     public function getLaycanStart(): ?\DateTimeInterface
  533.     {
  534.         return $this->laycanStart;
  535.     }
  536.     public function getLaycanStartDate(): ?string
  537.     {
  538.         return $this->laycanStart $this->laycanStart->format('Y-m-d') : null;
  539.     }
  540.     public function getLaycanStartTime(): ?string
  541.     {
  542.         return $this->laycanStart $this->laycanStart->format('H:i') : null;
  543.     }
  544.     public function setLaycanEnd(?\DateTimeInterface $laycanEnd): void
  545.     {
  546.         $this->laycanEnd $laycanEnd;
  547.     }
  548.     public function getLaycanEnd(): ?\DateTimeInterface
  549.     {
  550.         return $this->laycanEnd;
  551.     }
  552.     public function getLaycanEndDate(): ?string
  553.     {
  554.         return $this->laycanEnd $this->laycanEnd->format('Y-m-d') : null;
  555.     }
  556.     public function getLaycanEndTime(): ?string
  557.     {
  558.         return $this->laycanEnd $this->laycanEnd->format('H:i') : null;
  559.     }
  560.     public function setVessel(?Vessel $vessel): void
  561.     {
  562.         $this->vessel $vessel;
  563.     }
  564.     public function getVessel(): ?Vessel
  565.     {
  566.         return $this->vessel;
  567.     }
  568.     public function setOwner(?Owner $owner): void
  569.     {
  570.         $this->owner $owner;
  571.     }
  572.     public function getOwner(): ?Owner
  573.     {
  574.         return $this->owner;
  575.     }
  576.     public function setCharterer(?Charterer $charterer): void
  577.     {
  578.         $this->charterer $charterer;
  579.     }
  580.     public function getCharterer(): ?Charterer
  581.     {
  582.         return $this->charterer;
  583.     }
  584.     public function addDocument(Media $document): void
  585.     {
  586.         $document->setContract($this);
  587.         $this->documents[] = $document;
  588.     }
  589.     public function removeDocument(Media $document): void
  590.     {
  591.         $this->documents->removeElement($document);
  592.     }
  593.     public function getDocuments(): Collection
  594.     {
  595.         return $this->documents;
  596.     }
  597.     public function setBroker(?User $broker): void
  598.     {
  599.         $this->broker $broker;
  600.     }
  601.     public function getBroker(): ?User
  602.     {
  603.         return $this->broker;
  604.     }
  605.     public function setOperator(?User $operator): void
  606.     {
  607.         $this->operator $operator;
  608.     }
  609.     public function getOperator(): ?User
  610.     {
  611.         return $this->operator;
  612.     }
  613.     public function setDemurragePerDay(?string $demurragePerDay): void
  614.     {
  615.         $this->demurragePerDay $demurragePerDay;
  616.     }
  617.     public function getDemurragePerDay(): ?string
  618.     {
  619.         return $this->demurragePerDay;
  620.     }
  621.     public function getDemurragePerDayCurrency(): ?string
  622.     {
  623.         return $this->demurragePerDayCurrency;
  624.     }
  625.     public function setDemurragePerDayCurrency(?string $demurragePerDayCurrency): void
  626.     {
  627.         $this->demurragePerDayCurrency $demurragePerDayCurrency;
  628.     }
  629.     public function setAddressCommission(?string $addressCommission): void
  630.     {
  631.         $this->addressCommission $addressCommission;
  632.     }
  633.     public function getAddressCommission(): ?string
  634.     {
  635.         return $this->addressCommission;
  636.     }
  637.     public function setbrokerageCommission(?string $brokerageCommission): void
  638.     {
  639.         $this->brokerageCommission $brokerageCommission;
  640.     }
  641.     public function getbrokerageCommission(): ?string
  642.     {
  643.         return $this->brokerageCommission;
  644.     }
  645.     public function setLiftingsMin(?int $liftingsMin): void
  646.     {
  647.         $this->liftingsMin $liftingsMin;
  648.     }
  649.     public function getLiftingsMin(): ?int
  650.     {
  651.         return $this->liftingsMin;
  652.     }
  653.     public function setLiftingsMax(?int $liftingsMax): void
  654.     {
  655.         $this->liftingsMax $liftingsMax;
  656.     }
  657.     public function getLiftingsMax(): ?int
  658.     {
  659.         return $this->liftingsMax;
  660.     }
  661.     public function addPortCall(PortCall $portCall): void
  662.     {
  663.         $portCall->setContract($this);
  664.         $this->portCalls[] = $portCall;
  665.     }
  666.     public function removePortCall(PortCall $portCall): void
  667.     {
  668.         $this->portCalls->removeElement($portCall);
  669.     }
  670.     public function getPortCalls(): Collection
  671.     {
  672.         return $this->portCalls;
  673.     }
  674.     public function addReportedPort(ReportedPort $reportedPort): void
  675.     {
  676.         $reportedPort->setContract($this);
  677.         $this->reportedPorts[] = $reportedPort;
  678.     }
  679.     public function removeReportedPort(ReportedPort $reportedPort): void
  680.     {
  681.         $this->reportedPorts->removeElement($reportedPort);
  682.     }
  683.     public function getReportedPorts(): Collection
  684.     {
  685.         return $this->reportedPorts;
  686.     }
  687.     public function addReportedIncident(ReportedIncident $reportedIncident): void
  688.     {
  689.         $reportedIncident->setContract($this);
  690.         $this->reportedIncidents[] = $reportedIncident;
  691.     }
  692.     public function removeReportedIncident(ReportedIncident $reportedIncident): void
  693.     {
  694.         $this->reportedIncidents->removeElement($reportedIncident);
  695.     }
  696.     public function getReportedIncidents(): Collection
  697.     {
  698.         return $this->reportedIncidents;
  699.     }
  700.     public function addCargoItem(ContractCargo $cargoItem): void
  701.     {
  702.         $cargoItem->setContract($this);
  703.         $this->cargoItems[] = $cargoItem;
  704.     }
  705.     public function removeCargoItem(ContractCargo $cargoItem): void
  706.     {
  707.         $this->cargoItems->removeElement($cargoItem);
  708.     }
  709.     public function getCargoItems(): Collection
  710.     {
  711.         return $this->cargoItems;
  712.     }
  713.     public function getPayments(): Collection
  714.     {
  715.         return $this->payments;
  716.     }
  717.     public function addPayment(Payment $payment): void
  718.     {
  719.         $payment->setContract($this);
  720.         $this->payments[] = $payment;
  721.     }
  722.     public function removePayment(Payment $payment): void
  723.     {
  724.         $this->payments->removeElement($payment);
  725.     }
  726.     public function getHires(): Collection
  727.     {
  728.         return $this->hires;
  729.     }
  730.     public function addHire(Hire $hire): void
  731.     {
  732.         $hire->setContract($this);
  733.         $this->hires[] = $hire;
  734.     }
  735.     public function removeHire(Hire $hire): void
  736.     {
  737.         $this->hires->removeElement($hire);
  738.     }
  739.     // public function addLifting(Lifting $lifting): void
  740.     // {
  741.     //     $lifting->setContract($this);
  742.     //     $this->liftings[] = $lifting;
  743.     // }
  744.     // public function removeLifting(Lifting $lifting): void
  745.     // {
  746.     //     $this->liftings->removeElement($lifting);
  747.     // }
  748.     // public function getLiftings(): Collection
  749.     // {
  750.     //     return $this->liftings;
  751.     // }
  752.     public function addLifting(Contract $lifting): void
  753.     {
  754.         $lifting->setContractCoa($this);
  755.         $this->liftings[] = $lifting;
  756.     }
  757.     public function removeLifting(Contract $lifting): void
  758.     {
  759.         $this->liftings->removeElement($lifting);
  760.     }
  761.     public function getLiftings(): Collection
  762.     {
  763.         return $this->liftings;
  764.     }
  765.     public function getFreightCost(): ?string
  766.     {
  767.         return $this->freightCost;
  768.     }
  769.     public function setFreightCost(?string $freightCost): void
  770.     {
  771.         $this->freightCost $freightCost;
  772.     }
  773.     public function getFreightCostCurrency(): ?string
  774.     {
  775.         return $this->freightCostCurrency;
  776.     }
  777.     public function setFreightCostCurrency(?string $freightCostCurrency): void
  778.     {
  779.         $this->freightCostCurrency $freightCostCurrency;
  780.     }
  781.     public function getFreightType(): ?string
  782.     {
  783.         return $this->freightType;
  784.     }
  785.     public function setFreightType(?string $freightType): void
  786.     {
  787.         $this->freightType $freightType;
  788.     }
  789.     public function addAdditionalCost(AdditionalCost $additionalCost): void
  790.     {
  791.         $additionalCost->setContract($this);
  792.         $this->additionalCosts[] = $additionalCost;
  793.     }
  794.     public function removeAdditionalCost(AdditionalCost $additionalCost): void
  795.     {
  796.         $this->additionalCosts->removeElement($additionalCost);
  797.     }
  798.     public function getAdditionalCosts(): ?Collection
  799.     {
  800.         return $this->additionalCosts;
  801.     }
  802.     public function setStatus(?string $status): void
  803.     {
  804.         $this->status $status;
  805.     }
  806.     public function getStatus(): ?string
  807.     {
  808.         return $this->status;
  809.     }
  810.     public function setChecklist(?Checklist $checklist): void
  811.     {
  812.         $this->checklist $checklist;
  813.     }
  814.     public function getChecklist(): ?Checklist
  815.     {
  816.         return $this->checklist;
  817.     }
  818.     public function addCheckedTask(Task $checkedTask): void
  819.     {
  820.         $this->checkedTasks[] = $checkedTask;
  821.     }
  822.     public function removeCheckedTask(Task $checkedTask): void
  823.     {
  824.         $this->checkedTasks->removeElement($checkedTask);
  825.     }
  826.     public function getCheckedTasks(): Collection
  827.     {
  828.         return $this->checkedTasks;
  829.     }
  830.     public function setChecklistNotes(?string $checklistNotes): void
  831.     {
  832.         $this->checklistNotes $checklistNotes;
  833.     }
  834.     public function getChecklistNotes(): ?string
  835.     {
  836.         return $this->checklistNotes;
  837.     }
  838.     public function setDemurrageStatus(?string $demurrageStatus): void
  839.     {
  840.         $this->demurrageStatus $demurrageStatus;
  841.     }
  842.     public function getDemurrageStatus(): ?string
  843.     {
  844.         return $this->demurrageStatus;
  845.     }
  846.     public function setDemurrageTimeBar(?int $demurrageTimeBar): void
  847.     {
  848.         $this->demurrageTimeBar $demurrageTimeBar;
  849.     }
  850.     public function getDemurrageTimeBar(): ?int
  851.     {
  852.         return $this->demurrageTimeBar;
  853.     }
  854.     public function setDemurragePaymentDate(?\DateTimeInterface $demurragePaymentDate): void
  855.     {
  856.         $this->demurragePaymentDate $demurragePaymentDate;
  857.     }
  858.     public function getDemurragePaymentDate(): ?string
  859.     {
  860.         return $this->demurragePaymentDate?->format('Y-m-d');
  861.     }
  862.     public function getDemurragePaidByCharterer(): ?string
  863.     {
  864.         return $this->demurragePaidByCharterer;
  865.     }
  866.     public function setDemurragePaidByCharterer(?string $demurragePaidByCharterer): void
  867.     {
  868.         $this->demurragePaidByCharterer $demurragePaidByCharterer;
  869.     }
  870.     public function getDemurragePaidByChartererCurrency(): ?string
  871.     {
  872.         return $this->demurragePaidByChartererCurrency;
  873.     }
  874.     public function setDemurragePaidByChartererCurrency(?string $demurragePaidByChartererCurrency): void
  875.     {
  876.         $this->demurragePaidByChartererCurrency $demurragePaidByChartererCurrency;
  877.     }
  878.     public function getFinalDemurrageCost(): ?string
  879.     {
  880.         return $this->finalDemurrageCost;
  881.     }
  882.     public function setFinalDemurrageCost(?string $finalDemurrageCost): void
  883.     {
  884.         $this->finalDemurrageCost $finalDemurrageCost;
  885.     }
  886.     public function getFinalDemurrageCostCurrency(): ?string
  887.     {
  888.         return $this->finalDemurrageCostCurrency;
  889.     }
  890.     public function setFinalDemurrageCostCurrency(?string $finalDemurrageCostCurrency): void
  891.     {
  892.         $this->finalDemurrageCostCurrency $finalDemurrageCostCurrency;
  893.     }
  894.     public function getEtaArrival(): ?\DateTimeInterface
  895.     {
  896.         return $this->etaArrival;
  897.     }
  898.     public function getEtaArrivalDate(): ?string
  899.     {
  900.         return $this->etaArrival $this->etaArrival->format('Y-m-d') : null;
  901.     }
  902.     public function getEtaArrivalTime(): ?string
  903.     {
  904.         return $this->etaArrival $this->etaArrival->format('H:i') : null;
  905.     }
  906.     public function setEtaArrival(?\DateTimeInterface $etaArrival): void
  907.     {
  908.         $this->etaArrival $etaArrival;
  909.     }
  910.     public function getDeliveredArrival(): ?\DateTimeInterface
  911.     {
  912.         return $this->deliveredArrival;
  913.     }
  914.     public function getDeliveredArrivalDate(): ?string
  915.     {
  916.         return $this->deliveredArrival $this->deliveredArrival->format('Y-m-d') : null;
  917.     }
  918.     public function getDeliveredArrivalTime(): ?string
  919.     {
  920.         return $this->deliveredArrival $this->deliveredArrival->format('H:i') : null;
  921.     }
  922.     public function setDeliveredArrival(?\DateTimeInterface $deliveredArrival): void
  923.     {
  924.         $this->deliveredArrival $deliveredArrival;
  925.     }
  926.     public function getDeliveryAproxNotice1(): ?int
  927.     {
  928.         return $this->deliveryAproxNotice1;
  929.     }
  930.     public function setDeliveryAproxNotice1(?int $deliveryAproxNotice1): void
  931.     {
  932.         $this->deliveryAproxNotice1 $deliveryAproxNotice1;
  933.     }
  934.     public function getDeliveryAproxNotice2(): ?int
  935.     {
  936.         return $this->deliveryAproxNotice2;
  937.     }
  938.     public function setDeliveryAproxNotice2(?int $deliveryAproxNotice2): void
  939.     {
  940.         $this->deliveryAproxNotice2 $deliveryAproxNotice2;
  941.     }
  942.     public function getDeliveryAproxNotice3(): ?int
  943.     {
  944.         return $this->deliveryAproxNotice3;
  945.     }
  946.     public function setDeliveryAproxNotice3(?int $deliveryAproxNotice3): void
  947.     {
  948.         $this->deliveryAproxNotice3 $deliveryAproxNotice3;
  949.     }
  950.     public function getDeliveryAproxNotice4(): ?int
  951.     {
  952.         return $this->deliveryAproxNotice4;
  953.     }
  954.     public function setDeliveryAproxNotice4(?int $deliveryAproxNotice4): void
  955.     {
  956.         $this->deliveryAproxNotice4 $deliveryAproxNotice4;
  957.     }
  958.     public function getDeliveryAproxNotice5(): ?int
  959.     {
  960.         return $this->deliveryAproxNotice5;
  961.     }
  962.     public function setDeliveryAproxNotice5(?int $deliveryAproxNotice5): void
  963.     {
  964.         $this->deliveryAproxNotice5 $deliveryAproxNotice5;
  965.     }
  966.     public function getDeliveryAproxNotice6(): ?int
  967.     {
  968.         return $this->deliveryAproxNotice6;
  969.     }
  970.     public function setDeliveryAproxNotice6(?int $deliveryAproxNotice6): void
  971.     {
  972.         $this->deliveryAproxNotice6 $deliveryAproxNotice6;
  973.     }
  974.     public function getDeliveryAproxNotice7(): ?int
  975.     {
  976.         return $this->deliveryAproxNotice7;
  977.     }
  978.     public function setDeliveryAproxNotice7(?int $deliveryAproxNotice7): void
  979.     {
  980.         $this->deliveryAproxNotice7 $deliveryAproxNotice7;
  981.     }
  982.     public function getDeliveryFirmNotice1(): ?int
  983.     {
  984.         return $this->deliveryFirmNotice1;
  985.     }
  986.     public function setDeliveryFirmNotice1(?int $deliveryFirmNotice1): void
  987.     {
  988.         $this->deliveryFirmNotice1 $deliveryFirmNotice1;
  989.     }
  990.     public function getDeliveryFirmNotice2(): ?int
  991.     {
  992.         return $this->deliveryFirmNotice2;
  993.     }
  994.     public function setDeliveryFirmNotice2(?int $deliveryFirmNotice2): void
  995.     {
  996.         $this->deliveryFirmNotice2 $deliveryFirmNotice2;
  997.     }
  998.     public function getDeliveryFirmNotice3(): ?int
  999.     {
  1000.         return $this->deliveryFirmNotice3;
  1001.     }
  1002.     public function setDeliveryFirmNotice3(?int $deliveryFirmNotice3): void
  1003.     {
  1004.         $this->deliveryFirmNotice3 $deliveryFirmNotice3;
  1005.     }
  1006.     public function getDeliveryFirmNotice4(): ?int
  1007.     {
  1008.         return $this->deliveryFirmNotice4;
  1009.     }
  1010.     public function setDeliveryFirmNotice4(?int $deliveryFirmNotice4): void
  1011.     {
  1012.         $this->deliveryFirmNotice4 $deliveryFirmNotice4;
  1013.     }
  1014.     public function getDeliveryFirmNotice5(): ?int
  1015.     {
  1016.         return $this->deliveryFirmNotice5;
  1017.     }
  1018.     public function setDeliveryFirmNotice5(?int $deliveryFirmNotice5): void
  1019.     {
  1020.         $this->deliveryFirmNotice5 $deliveryFirmNotice5;
  1021.     }
  1022.     public function getDeliveryFirmNotice6(): ?int
  1023.     {
  1024.         return $this->deliveryFirmNotice6;
  1025.     }
  1026.     public function setDeliveryFirmNotice6(?int $deliveryFirmNotice6): void
  1027.     {
  1028.         $this->deliveryFirmNotice6 $deliveryFirmNotice6;
  1029.     }
  1030.     public function getDeliveryFirmNotice7(): ?int
  1031.     {
  1032.         return $this->deliveryFirmNotice7;
  1033.     }
  1034.     public function setDeliveryFirmNotice7(?int $deliveryFirmNotice7): void
  1035.     {
  1036.         $this->deliveryFirmNotice7 $deliveryFirmNotice7;
  1037.     }
  1038.     public function getDeliveryNoticesNotAplicable(): ?bool
  1039.     {
  1040.         return $this->deliveryNoticesNotAplicable;
  1041.     }
  1042.     public function setDeliveryNoticesNotAplicable(?bool $deliveryNoticesNotAplicable): void
  1043.     {
  1044.         $this->deliveryNoticesNotAplicable $deliveryNoticesNotAplicable;
  1045.     }
  1046.     public function getShipDelivered(): ?bool
  1047.     {
  1048.         return $this->shipDelivered;
  1049.     }
  1050.     public function setShipDelivered(?bool $shipDelivered): void
  1051.     {
  1052.         $this->shipDelivered $shipDelivered;
  1053.     }
  1054.     public function getDeliveryPort1(): ?Port
  1055.     {
  1056.         return $this->deliveryPort1;
  1057.     }
  1058.     public function setDeliveryPort1(?Port $deliveryPort1): void
  1059.     {
  1060.         $this->deliveryPort1 $deliveryPort1;
  1061.     }
  1062.     public function getDeliveryPort2(): ?Port
  1063.     {
  1064.         return $this->deliveryPort2;
  1065.     }
  1066.     public function setDeliveryPort2(?Port $deliveryPort2): void
  1067.     {
  1068.         $this->deliveryPort2 $deliveryPort2;
  1069.     }
  1070.     public function getHirePerDay(): ?string
  1071.     {
  1072.         return $this->hirePerDay;
  1073.     }
  1074.     public function setHirePerDay(?string $hirePerDay): void
  1075.     {
  1076.         $this->hirePerDay $hirePerDay;
  1077.     }
  1078.     public function getHirePerDayCurrency(): ?string
  1079.     {
  1080.         return $this->hirePerDayCurrency;
  1081.     }
  1082.     public function setHirePerDayCurrency(?string $hirePerDayCurrency): void
  1083.     {
  1084.         $this->hirePerDayCurrency $hirePerDayCurrency;
  1085.     }
  1086.     public function getPeriod(): ?int
  1087.     {
  1088.         return $this->period;
  1089.     }
  1090.     public function setPeriod(?int $period): void
  1091.     {
  1092.         $this->period $period;
  1093.     }
  1094.     public function addDeliveryNotice(DeliveryNotice $deliveryNotice): void
  1095.     {
  1096.         $deliveryNotice->setContract($this);
  1097.         $this->deliveryNotices[] = $deliveryNotice;
  1098.     }
  1099.     public function removeDeliveryNotice(DeliveryNotice $deliveryNotice): void
  1100.     {
  1101.         $this->deliveryNotices->removeElement($deliveryNotice);
  1102.     }
  1103.     public function getDeliveryNotices(): ?Collection
  1104.     {
  1105.         return $this->deliveryNotices;
  1106.     }
  1107.     public function setReportDescription(?string $reportDescription): void
  1108.     {
  1109.         $this->reportDescription $reportDescription;
  1110.     }
  1111.     public function getReportDescription(): ?string
  1112.     {
  1113.         return $this->reportDescription;
  1114.     }
  1115.     public function getVesselArrivedWithinTheLaycan(): ?bool
  1116.     {
  1117.         return $this->vesselArrivedWithinTheLaycan;
  1118.     }
  1119.     public function setVesselArrivedWithinTheLaycan(?bool $vesselArrivedWithinTheLaycan): void
  1120.     {
  1121.         $this->vesselArrivedWithinTheLaycan $vesselArrivedWithinTheLaycan;
  1122.     }
  1123.     public function getVesselWasSubstituted(): ?bool
  1124.     {
  1125.         return $this->vesselWasSubstituted;
  1126.     }
  1127.     public function setVesselWasSubstituted(?bool $vesselWasSubstituted): void
  1128.     {
  1129.         $this->vesselWasSubstituted $vesselWasSubstituted;
  1130.     }
  1131.     public function getAddendumIssued(): ?bool
  1132.     {
  1133.         return $this->addendumIssued;
  1134.     }
  1135.     public function setAddendumIssued(?bool $addendumIssued): void
  1136.     {
  1137.         $this->addendumIssued $addendumIssued;
  1138.     }
  1139.     public function setAddendumDescription(?string $addendumDescription): void
  1140.     {
  1141.         $this->addendumDescription $addendumDescription;
  1142.     }
  1143.     public function getAddendumDescription(): ?string
  1144.     {
  1145.         return $this->addendumDescription;
  1146.     }
  1147.     public function setContractCoa(?Contract $contract): void
  1148.     {
  1149.         $this->contractCoa $contract;
  1150.     }
  1151.     public function getContractCoa(): ?Contract
  1152.     {
  1153.         return $this->contractCoa;
  1154.     }
  1155.     public function getCargoVolumeM3(): ?string
  1156.     {
  1157.         $totalVolume 0.0;
  1158.         foreach ($this->getCargoItems() as $cargoItem) {
  1159.             $totalVolume += (float) $cargoItem->getQuantityM3();
  1160.         }
  1161.         return number_format($totalVolume3'.''');
  1162.     }
  1163.     public function getCargoVolumeMT(): ?string
  1164.     {
  1165.         $totalVolume 0.0;
  1166.         foreach ($this->getCargoItems() as $cargoItem) {
  1167.             $totalVolume += (float) $cargoItem->getQuantityMT();
  1168.         }
  1169.         return number_format($totalVolume3'.''');
  1170.     }
  1171. }