src/Entity/Transaction.php line 12

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