<?php
namespace App\Entity\BaseSite;
use App\Entity\BaseEntity;
use App\Entity\Generic\User;
use App\Entity\Telegram\Ad;
use App\Repository\BaseSite\TransactionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: TransactionRepository::class)]
#[ORM\Table(name: '`base_site_transaction`' )]
class Transaction extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private $id;
#[ORM\ManyToOne(inversedBy: 'transactions')]
#[ORM\JoinColumn(nullable: false)]
private ?User $owner = null;
#[ORM\Column]
private ?bool $type = null;
#[ORM\Column(type: Types::BIGINT)]
private ?string $price = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $description = null;
#[ORM\Column(type: Types::BIGINT)]
private ?string $beforeWallet = null;
#[ORM\Column(type: Types::BIGINT)]
private ?string $afterWallet = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $followCode = null;
public function __construct()
{
parent::__construct();
}
public function getId(): ?string
{
return $this->id;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): static
{
$this->owner = $owner;
return $this;
}
public function isType(): ?bool
{
return $this->type;
}
public function setType(bool $type): static
{
$this->type = $type;
return $this;
}
public function getPrice(): ?string
{
return $this->price;
}
public function setPrice(string $price): static
{
$this->price = $price;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): static
{
$this->description = $description;
return $this;
}
public function getBeforeWallet(): ?string
{
return $this->beforeWallet;
}
public function setBeforeWallet(string $beforeWallet): static
{
$this->beforeWallet = $beforeWallet;
return $this;
}
public function getAfterWallet(): ?string
{
return $this->afterWallet;
}
public function setAfterWallet(string $afterWallet): static
{
$this->afterWallet = $afterWallet;
return $this;
}
public function getFollowCode(): ?string
{
return $this->followCode;
}
public function setFollowCode(?string $followCode): static
{
$this->followCode = $followCode;
return $this;
}
}