<?php
namespace App\Entity\Shop\Accounting;
use App\Entity\BaseEntity;
use App\Entity\Generic\Customer\Customer;
use App\Entity\Shop\Order\Order;
use App\Entity\Shop\Shop\Shop;
use App\Repository\Shop\Accounting\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: '`shop_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 ?Customer $owner = null;
#[ORM\Column]
private ?bool $type = null;
#[ORM\Column(type: Types::BIGINT)]
private ?string $price = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
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;
#[ORM\ManyToOne(inversedBy: 'transactions')]
#[ORM\JoinColumn(nullable: false)]
private ?Shop $shop = null;
#[ORM\ManyToOne(inversedBy: 'transactions')]
private ?Order $paidOrder = null;
public function getId(): ?string
{
return $this->id;
}
public function getOwner(): ?Customer
{
return $this->owner;
}
public function setOwner(?Customer $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;
}
public function getShop(): ?Shop
{
return $this->shop;
}
public function setShop(?Shop $shop): static
{
$this->shop = $shop;
return $this;
}
public function getPaidOrder(): ?Order
{
return $this->paidOrder;
}
public function setPaidOrder(?Order $paidOrder): static
{
$this->paidOrder = $paidOrder;
return $this;
}
}