add authentication
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marko
2023-11-10 16:54:07 +01:00
parent 9c2e2b6ade
commit 8554cf714d
28 changed files with 699 additions and 774 deletions

View File

@@ -2,8 +2,10 @@
namespace App\Entity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\OrderRepository;
use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
@@ -14,6 +16,7 @@ use Doctrine\ORM\Mapping as ORM;
* 2 = Bestellung in Bearbeitung
* 3 = Bestellung versendet
*/
#[ORM\Entity(repositoryClass: OrderRepository::class)]
#[ORM\Table(name: '`order`')]
#[ApiResource]
@@ -22,9 +25,12 @@ class Order
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[ApiProperty(identifier: false)]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[ORM\Column(length: 255,unique: true)]
#[ApiProperty(identifier: true)]
private ?string $orderId = null;
#[ORM\Column]
@@ -33,8 +39,8 @@ class Order
#[ORM\Column]
private array $data = [];
#[ORM\Column(name: 'change_date',type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
private ?\DateTimeInterface $changeDate = null;
#[ORM\Column(name: 'change_date', type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
private ?DateTimeInterface $changeDate = null;
public function getId(): ?int
{
@@ -77,12 +83,12 @@ class Order
return $this;
}
public function getChangeDate(): ?\DateTimeInterface
public function getChangeDate(): ?DateTimeInterface
{
return $this->changeDate;
}
public function setChangeDate(\DateTimeInterface $changeDate): static
public function setChangeDate(DateTimeInterface $changeDate): static
{
$this->changeDate = $changeDate;