src/Entity/Website/Transaction.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Website;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Generic\Customer\Customer;
  5. use App\Entity\Website\Website\Website;
  6. use App\Repository\Website\TransactionRepository;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  10. #[ORM\Entity(repositoryClassTransactionRepository::class)]
  11. class Transaction extends BaseEntity
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\Column(type'guid'uniquetrue)]
  15.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  16.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  17.     private ?string $id null;
  18.     #[ORM\Column]
  19.     private ?int $type null;
  20.     #[ORM\Column]
  21.     private ?int $price null;
  22.     #[ORM\Column(typeTypes::TEXT)]
  23.     private ?string $description null;
  24.     #[ORM\Column]
  25.     private ?int $beforeWallet null;
  26.     #[ORM\Column]
  27.     private ?int $afterWallet null;
  28.     #[ORM\Column]
  29.     private ?bool $mabeByAdmin null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $bidFollowCode null;
  32.     #[ORM\Column(length255nullabletrue)]
  33.     private ?string $serviceId null;
  34.     #[ORM\Column(length255nullabletrue)]
  35.     private ?string $increaseType null;
  36.     #[ORM\Column]
  37.     private ?bool $isProfit null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $serviceProtocol null;
  40.     #[ORM\Column(length255nullabletrue)]
  41.     private ?string $panelServiceType null;
  42.     #[ORM\ManyToOne(inversedBy'transactions')]
  43.     private ?Customer $owner null;
  44.     #[ORM\ManyToOne(inversedBy'madeTransactions')]
  45.     private ?Customer $author null;
  46.     #[ORM\ManyToOne(inversedBy'websiteTransactions')]
  47.     #[ORM\JoinColumn(nullablefalse)]
  48.     private ?Website $website null;
  49.     public function getOwnerEmail()
  50.     {
  51.         return $this->getOwner()->getEmail();
  52.     }
  53.     public function __construct()
  54.     {
  55.         parent::__construct();
  56.         $this->setMabeByAdmin(0);
  57.         $this->setIsProfit(0);
  58.     }
  59.     public function setMabeByAdmin(bool $mabeByAdmin): self
  60.     {
  61.         $this->mabeByAdmin $mabeByAdmin;
  62.         return $this;
  63.     }
  64.     public function getId(): ?string
  65.     {
  66.         return $this->id;
  67.     }
  68.     public function getType(): ?int
  69.     {
  70.         return $this->type;
  71.     }
  72.     public function setType(int $type): self
  73.     {
  74.         $this->type $type;
  75.         return $this;
  76.     }
  77.     public function getPrice(): ?int
  78.     {
  79.         return $this->price;
  80.     }
  81.     public function setPrice(int $price): self
  82.     {
  83.         $this->price $price;
  84.         return $this;
  85.     }
  86.     public function getDescription(): ?string
  87.     {
  88.         return $this->description;
  89.     }
  90.     public function setDescription(string $description): self
  91.     {
  92.         $this->description $description;
  93.         return $this;
  94.     }
  95.     public function getBeforeWallet(): ?int
  96.     {
  97.         return $this->beforeWallet;
  98.     }
  99.     public function setBeforeWallet(int $beforeWallet): self
  100.     {
  101.         $this->beforeWallet $beforeWallet;
  102.         return $this;
  103.     }
  104.     public function getAfterWallet(): ?int
  105.     {
  106.         return $this->afterWallet;
  107.     }
  108.     public function setAfterWallet(int $afterWallet): self
  109.     {
  110.         $this->afterWallet $afterWallet;
  111.         return $this;
  112.     }
  113.     public function isMabeByAdmin(): ?bool
  114.     {
  115.         return $this->mabeByAdmin;
  116.     }
  117.     public function getBidFollowCode(): ?string
  118.     {
  119.         return $this->bidFollowCode;
  120.     }
  121.     public function setBidFollowCode(?string $bidFollowCode): self
  122.     {
  123.         $this->bidFollowCode $bidFollowCode;
  124.         return $this;
  125.     }
  126.     public function getServiceId(): ?string
  127.     {
  128.         return $this->serviceId;
  129.     }
  130.     public function setServiceId(?string $serviceId): self
  131.     {
  132.         $this->serviceId $serviceId;
  133.         return $this;
  134.     }
  135.     public function getIncreaseType(): ?string
  136.     {
  137.         return $this->increaseType;
  138.     }
  139.     public function setIncreaseType(?string $increaseType): self
  140.     {
  141.         $this->increaseType $increaseType;
  142.         return $this;
  143.     }
  144.     public function isIsProfit(): ?bool
  145.     {
  146.         return $this->isProfit;
  147.     }
  148.     public function setIsProfit(bool $isProfit): self
  149.     {
  150.         $this->isProfit $isProfit;
  151.         return $this;
  152.     }
  153.     public function getServiceProtocol(): ?string
  154.     {
  155.         return $this->serviceProtocol;
  156.     }
  157.     public function setServiceProtocol(?string $serviceProtocol): self
  158.     {
  159.         $this->serviceProtocol $serviceProtocol;
  160.         return $this;
  161.     }
  162.     public function getPanelServiceType(): ?string
  163.     {
  164.         return $this->panelServiceType;
  165.     }
  166.     public function setPanelServiceType(?string $panelServiceType): static
  167.     {
  168.         $this->panelServiceType $panelServiceType;
  169.         return $this;
  170.     }
  171.     public function getOwner(): ?Customer
  172.     {
  173.         return $this->owner;
  174.     }
  175.     public function setOwner(?Customer $owner): static
  176.     {
  177.         $this->owner $owner;
  178.         return $this;
  179.     }
  180.     public function getAuthor(): ?Customer
  181.     {
  182.         return $this->author;
  183.     }
  184.     public function setAuthor(?Customer $author): static
  185.     {
  186.         $this->author $author;
  187.         return $this;
  188.     }
  189.     public function getWebsite(): ?Website
  190.     {
  191.         return $this->website;
  192.     }
  193.     public function setWebsite(?Website $website): static
  194.     {
  195.         $this->website $website;
  196.         return $this;
  197.     }
  198. }