<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'shoporder')]
#[ORM\Entity(repositoryClass: 'App\Entity\Repository\ShoporderRepository')]
class Shoporder
{
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', nullable: true)]
private $paypal_data;
#[ORM\Column(type: 'json', nullable: true)]
private $order_data;
#[ORM\Column(type: 'decimal', nullable: true, precision: 6, scale: 2)]
private $total_value;
#[ORM\Column(type: 'string', nullable: true)]
private $status;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_created;
#[ORM\ManyToOne(targetEntity: 'App\Entity\User', inversedBy: 'shoporder')]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: false)]
private $user;
public function getId(): ?int
{
return $this->id;
}
public function getPaypalData(): ?string
{
return $this->paypal_data;
}
public function setPaypalData(?string $paypal_data): self
{
$this->paypal_data = $paypal_data;
return $this;
}
public function getOrderData()
{
return $this->order_data;
}
public function setOrderData($order_data): self
{
$this->order_data = $order_data;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getDateCreated(): ?\DateTimeInterface
{
return $this->date_created;
}
public function setDateCreated(?\DateTimeInterface $date_created): self
{
$this->date_created = $date_created;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getTotalValue()
{
return $this->total_value;
}
public function setTotalValue($total_value): self
{
$this->total_value = $total_value;
return $this;
}
}