src/Entity/System/SubscriptionLineHistory.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * SubscriptionLine
  7.  *
  8.  * @ORM\Table(name="subscriptions_lines_history")
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\System\SubscriptionLineHistoryRepository")
  11.  */
  12. class SubscriptionLineHistory
  13. {
  14.     public const STATUS_CANCEL 'Cancel';
  15.     public const STATUS_ERROR 'Error';
  16.     public const STATUS_INIT_AMOUNT 'initAmount';
  17.     public const STATUS_FREE_PACK 'freePack';
  18.     public const STATUS_NOT_RENEWED_SUBSCRIPTIONS = [
  19.         self::STATUS_CANCELself::STATUS_ERRORself::STATUS_INIT_AMOUNTself::STATUS_INIT_AMOUNT,
  20.     ];
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Id
  25.      *
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      *
  28.      * @ORM\Column(type="integer", name="id_subscription_lines_history")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @var Subscription
  33.      *
  34.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Subscription", inversedBy="subscriptionLineHistories")
  35.      *
  36.      * @ORM\JoinColumn(referencedColumnName="id_subscription", name="id_subscription")
  37.      */
  38.     private $subscription;
  39.     /**
  40.      * @var SubscriptionLine
  41.      *
  42.      * @ORM\ManyToOne(targetEntity="SubscriptionLine")
  43.      *
  44.      * @ORM\JoinColumn(name="id_subscription_lines", referencedColumnName="id_subscription_lines")
  45.      */
  46.     private $subscriptionLine;
  47.     /**
  48.      * @var string|null
  49.      *
  50.      * @ORM\Column(type="string", nullable=true)
  51.      */
  52.     private $name;
  53.     /**
  54.      * @var \DateTime
  55.      *
  56.      * @ORM\Column(type="datetime", options={"default" : "CURRENT_TIMESTAMP"})
  57.      */
  58.     private $dateCreate;
  59.     /**
  60.      * @var Customer
  61.      *
  62.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer")
  63.      *
  64.      * @ORM\JoinColumn(referencedColumnName="id_customer", name="id_customer")
  65.      */
  66.     private $customer;
  67.     /**
  68.      * @var bool|null
  69.      *
  70.      * @ORM\Column(type="boolean", nullable=true)
  71.      */
  72.     private $vies;
  73.     /**
  74.      * @ORM\Column(type="datetime", nullable=true, options={"default" : "0000-00-00 00:00:00"})
  75.      */
  76.     private $dateDue;
  77.     /**
  78.      * @var float|null
  79.      *
  80.      * @ORM\Column(type="float", nullable=true)
  81.      */
  82.     private $cost;
  83.     /**
  84.      * @var int|null
  85.      *
  86.      * @ORM\Column(type="integer", nullable=true)
  87.      */
  88.     private $userCreate;
  89.     /**
  90.      * @var int|null
  91.      *
  92.      * @ORM\Column(type="integer", nullable=true)
  93.      */
  94.     private $userMod;
  95.     /**
  96.      * @var int|null
  97.      *
  98.      * @ORM\Column(type="integer", nullable=true)
  99.      */
  100.     private $nintentos;
  101.     /**
  102.      * @var string|null
  103.      *
  104.      * @ORM\Column(name="id_transaction", type="string", length=50, nullable=true)
  105.      */
  106.     private $transaction;
  107.     /**
  108.      * @var bool|null
  109.      *
  110.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default":0}, nullable=true)
  111.      */
  112.     private $erp;
  113.     /**
  114.      * @var string|null
  115.      *
  116.      * @ORM\Column(type="string", length=100, nullable=true)
  117.      */
  118.     private $idSubscriptionPaypal;
  119.     /**
  120.      * @var string|null
  121.      *
  122.      * @ORM\Column(type="text", nullable=true)
  123.      */
  124.     private $information;
  125.     /**
  126.      * @var array|ArrayCollection<int, SubscriptionCustomerHistory>
  127.      *
  128.      * @ORM\OneToMany(targetEntity="App\Entity\System\SubscriptionCustomerHistory", mappedBy="subscriptionLineHistory", cascade={"persist"})
  129.      */
  130.     private $subscriptionCustomerHistories;
  131.     /**
  132.      * @ORM\Column(type="boolean", nullable=true, options={"default": 0})
  133.      */
  134.     private bool $migrated false;
  135.     /**
  136.      * @ORM\Column(type="string", length=64, name="internal_migration_status", nullable=true)
  137.      */
  138.     private ?string $internalMigrationStatus;
  139.     public function __construct()
  140.     {
  141.         $this->subscriptionCustomerHistories = new ArrayCollection();
  142.     }
  143.     /**
  144.      * @return int
  145.      */
  146.     public function getId(): int
  147.     {
  148.         return $this->id;
  149.     }
  150.     /**
  151.      * @return Subscription
  152.      */
  153.     public function getSubscription(): Subscription
  154.     {
  155.         return $this->subscription;
  156.     }
  157.     /**
  158.      * @param Subscription $subscription
  159.      *
  160.      * @return SubscriptionLineHistory
  161.      */
  162.     public function setSubscription(Subscription $subscription): SubscriptionLineHistory
  163.     {
  164.         $this->subscription $subscription;
  165.         return $this;
  166.     }
  167.     /**
  168.      * @return SubscriptionLine
  169.      */
  170.     public function getSubscriptionLine(): SubscriptionLine
  171.     {
  172.         return $this->subscriptionLine;
  173.     }
  174.     /**
  175.      * @param SubscriptionLine $subscriptionLine
  176.      *
  177.      * @return SubscriptionLineHistory
  178.      */
  179.     public function setSubscriptionLine(SubscriptionLine $subscriptionLine): SubscriptionLineHistory
  180.     {
  181.         $this->subscriptionLine $subscriptionLine;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @return string|null
  186.      */
  187.     public function getName(): ?string
  188.     {
  189.         return $this->name;
  190.     }
  191.     /**
  192.      * @param string|null $name
  193.      *
  194.      * @return SubscriptionLineHistory
  195.      */
  196.     public function setName(?string $name): SubscriptionLineHistory
  197.     {
  198.         $this->name $name;
  199.         return $this;
  200.     }
  201.     /**
  202.      * @return \DateTime
  203.      */
  204.     public function getDateCreate(): \DateTime
  205.     {
  206.         return $this->dateCreate;
  207.     }
  208.     /**
  209.      * @param \DateTime $dateCreate
  210.      *
  211.      * @return SubscriptionLineHistory
  212.      */
  213.     public function setDateCreate(\DateTime $dateCreate): SubscriptionLineHistory
  214.     {
  215.         $this->dateCreate $dateCreate;
  216.         return $this;
  217.     }
  218.     /**
  219.      * @return Customer|null
  220.      */
  221.     public function getCustomer(): ?Customer
  222.     {
  223.         return $this->customer;
  224.     }
  225.     /**
  226.      * @param Customer|null $customer
  227.      *
  228.      * @return SubscriptionLineHistory
  229.      */
  230.     public function setCustomer(?Customer $customer): SubscriptionLineHistory
  231.     {
  232.         $this->customer $customer;
  233.         return $this;
  234.     }
  235.     /**
  236.      * @return bool|null
  237.      */
  238.     public function getVies(): ?bool
  239.     {
  240.         return $this->vies;
  241.     }
  242.     /**
  243.      * @param bool|null $vies
  244.      *
  245.      * @return SubscriptionLineHistory
  246.      */
  247.     public function setVies(?bool $vies): SubscriptionLineHistory
  248.     {
  249.         $this->vies $vies;
  250.         return $this;
  251.     }
  252.     /**
  253.      * @return \DateTime
  254.      */
  255.     public function getDateDue(): ?\DateTime
  256.     {
  257.         return $this->dateDue;
  258.     }
  259.     /**
  260.      * @param \DateTime|null $dateDue
  261.      *
  262.      * @return SubscriptionLineHistory
  263.      */
  264.     public function setDateDue(?\DateTime $dateDue): SubscriptionLineHistory
  265.     {
  266.         $this->dateDue $dateDue;
  267.         return $this;
  268.     }
  269.     /**
  270.      * @return float|null
  271.      */
  272.     public function getCost(): ?float
  273.     {
  274.         return $this->cost;
  275.     }
  276.     /**
  277.      * @param float|null $cost
  278.      *
  279.      * @return SubscriptionLineHistory
  280.      */
  281.     public function setCost(?float $cost): SubscriptionLineHistory
  282.     {
  283.         $this->cost $cost;
  284.         return $this;
  285.     }
  286.     /**
  287.      * @return int|null
  288.      */
  289.     public function getUserCreate(): ?int
  290.     {
  291.         return $this->userCreate;
  292.     }
  293.     /**
  294.      * @param int|null $userCreate
  295.      *
  296.      * @return SubscriptionLineHistory
  297.      */
  298.     public function setUserCreate(?int $userCreate): SubscriptionLineHistory
  299.     {
  300.         $this->userCreate $userCreate;
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return int|null
  305.      */
  306.     public function getUserMod(): ?int
  307.     {
  308.         return $this->userMod;
  309.     }
  310.     /**
  311.      * @param int|null $userMod
  312.      *
  313.      * @return SubscriptionLineHistory
  314.      */
  315.     public function setUserMod(?int $userMod): SubscriptionLineHistory
  316.     {
  317.         $this->userMod $userMod;
  318.         return $this;
  319.     }
  320.     public function getNintentos(): ?int
  321.     {
  322.         return $this->nintentos;
  323.     }
  324.     /**
  325.      * @param int|null $nintentos
  326.      *
  327.      * @return SubscriptionLineHistory
  328.      */
  329.     public function setNintentos(?int $nintentos): SubscriptionLineHistory
  330.     {
  331.         $this->nintentos $nintentos;
  332.         return $this;
  333.     }
  334.     /**
  335.      * @return string|null
  336.      */
  337.     public function getTransaction(): ?string
  338.     {
  339.         return $this->transaction;
  340.     }
  341.     /**
  342.      * @param string|null $transaction
  343.      *
  344.      * @return SubscriptionLineHistory
  345.      */
  346.     public function setTransaction(?string $transaction): SubscriptionLineHistory
  347.     {
  348.         $this->transaction $transaction;
  349.         return $this;
  350.     }
  351.     /**
  352.      * @return bool|null
  353.      */
  354.     public function getErp(): ?bool
  355.     {
  356.         return $this->erp;
  357.     }
  358.     /**
  359.      * @param bool|null $erp
  360.      *
  361.      * @return SubscriptionLineHistory
  362.      */
  363.     public function setErp(?bool $erp): SubscriptionLineHistory
  364.     {
  365.         $this->erp $erp;
  366.         return $this;
  367.     }
  368.     /**
  369.      * @return string|null
  370.      */
  371.     public function getIdSubscriptionPaypal(): ?string
  372.     {
  373.         return $this->idSubscriptionPaypal;
  374.     }
  375.     /**
  376.      * @param string|null $idSubscriptionPaypal
  377.      *
  378.      * @return SubscriptionLineHistory
  379.      */
  380.     public function setIdSubscriptionPaypal(?string $idSubscriptionPaypal): SubscriptionLineHistory
  381.     {
  382.         $this->idSubscriptionPaypal $idSubscriptionPaypal;
  383.         return $this;
  384.     }
  385.     /**
  386.      * @return string|null
  387.      */
  388.     public function getInformation(): ?string
  389.     {
  390.         return $this->information;
  391.     }
  392.     /**
  393.      * @param string|null $information
  394.      *
  395.      * @return SubscriptionLineHistory
  396.      */
  397.     public function setInformation(?string $information): SubscriptionLineHistory
  398.     {
  399.         $this->information $information;
  400.         return $this;
  401.     }
  402.     public function getSubscriptionCustomerHistories(): array
  403.     {
  404.         return $this->subscriptionCustomerHistories;
  405.     }
  406.     public function isMigrated(): bool
  407.     {
  408.         return $this->migrated;
  409.     }
  410.     public function setMigrated(bool $migrated): SubscriptionLineHistory
  411.     {
  412.         $this->migrated $migrated;
  413.         return $this;
  414.     }
  415.     public function getInternalMigrationStatus(): ?string
  416.     {
  417.         return $this->internalMigrationStatus;
  418.     }
  419.     public function setInternalMigrationStatus(?string $internalMigrationStatus): SubscriptionLineHistory
  420.     {
  421.         $this->internalMigrationStatus $internalMigrationStatus;
  422.         return $this;
  423.     }
  424.     public function setLineToMigrated(): SubscriptionLineHistory
  425.     {
  426.         $this->migrated  true;
  427.         $this->internalMigrationStatus 'migrated';
  428.         return $this;
  429.     }
  430. }