20-02-2026

This commit is contained in:
Kevin Adametz 2026-02-20 17:57:50 +01:00
parent 854ce02bf6
commit 4d6b4930b2
128 changed files with 18247 additions and 2093 deletions

View file

@ -0,0 +1,28 @@
<?php
namespace App\Enums;
enum CurationStatus: string
{
case Pending = 'pending';
case Approved = 'approved';
case Rejected = 'rejected';
public function label(): string
{
return match ($this) {
self::Pending => 'Ausstehend',
self::Approved => 'Freigegeben',
self::Rejected => 'Abgelehnt',
};
}
public function color(): string
{
return match ($this) {
self::Pending => 'yellow',
self::Approved => 'green',
self::Rejected => 'red',
};
}
}

21
app/Enums/PartnerType.php Normal file
View file

@ -0,0 +1,21 @@
<?php
namespace App\Enums;
enum PartnerType: string
{
case Retailer = 'Retailer';
case Manufacturer = 'Manufacturer';
case EstateAgent = 'Estate-Agent';
case Customer = 'Customer';
public function label(): string
{
return match ($this) {
self::Retailer => 'Händler',
self::Manufacturer => 'Hersteller',
self::EstateAgent => 'Makler',
self::Customer => 'Kunde',
};
}
}

19
app/Enums/PriceType.php Normal file
View file

@ -0,0 +1,19 @@
<?php
namespace App\Enums;
enum PriceType: string
{
case Fixed = 'fixed';
case FromPrice = 'from_price';
case OnRequest = 'on_request';
public function label(): string
{
return match ($this) {
self::Fixed => 'Festpreis',
self::FromPrice => 'Ab-Preis',
self::OnRequest => 'Preis auf Anfrage',
};
}
}

View file

@ -0,0 +1,37 @@
<?php
namespace App\Enums;
enum ProductStatus: string
{
case Draft = 'draft';
case Pending = 'pending';
case Correction = 'correction';
case Active = 'active';
case Archived = 'archived';
case Sold = 'sold';
public function label(): string
{
return match ($this) {
self::Draft => 'Entwurf',
self::Pending => 'In Prüfung',
self::Correction => 'Korrektur nötig',
self::Active => 'Freigegeben',
self::Archived => 'Archiviert',
self::Sold => 'Verkauft',
};
}
public function color(): string
{
return match ($this) {
self::Draft => 'yellow',
self::Pending => 'blue',
self::Correction => 'orange',
self::Active => 'green',
self::Archived => 'zinc',
self::Sold => 'red',
};
}
}

54
app/Enums/ProductType.php Normal file
View file

@ -0,0 +1,54 @@
<?php
namespace App\Enums;
enum ProductType: string
{
/**
* Typ A Teaser-Produkte: Beratungspflicht, Ticket zwingend.
* Komplexe Konfiguration (Maße, Module, Materialien) Abschluss nur im Laden.
*/
case LocalStock = 'local_stock';
/**
* Typ B Standard-Produkte: Einfache Varianten, skalierbar, Ticket optional.
* Online vollständig konfigurierbar und direkt kaufbar.
*/
case SmartOrder = 'smart_order';
public function label(): string
{
return match ($this) {
self::LocalStock => 'Local Express (Lagerware)',
self::SmartOrder => 'Smart Club (Konfiguration)',
};
}
/**
* Typ A (LocalStock) erfordert zwingend ein Ticket für den Ladenbesuch.
* Typ B (SmartOrder) kann direkt online bestellt werden Ticket optional.
*/
public function requiresTicket(): bool
{
return match ($this) {
self::LocalStock => true,
self::SmartOrder => false,
};
}
/**
* Erlaubte Preistypen je Produkttyp.
*
* Typ A (Teaser): Kein Festpreis online möglich nur Ab-Preis oder Preis auf Anfrage.
* Typ B (Standard): Alle Preistypen erlaubt.
*
* @return array<int, PriceType>
*/
public function allowedPriceTypes(): array
{
return match ($this) {
self::LocalStock => [PriceType::FromPrice, PriceType::OnRequest],
self::SmartOrder => [PriceType::Fixed, PriceType::FromPrice, PriceType::OnRequest],
};
}
}

28
app/Enums/UserOrigin.php Normal file
View file

@ -0,0 +1,28 @@
<?php
namespace App\Enums;
enum UserOrigin: string
{
case Style2Own = 'style2own';
case StilEigentum = 'stileigentum';
public function label(): string
{
return match ($this) {
self::Style2Own => 'Style2Own',
self::StilEigentum => 'StilEigentum',
};
}
/**
* @return 'du'|'sie'
*/
public function tonality(): string
{
return match ($this) {
self::Style2Own => 'du',
self::StilEigentum => 'sie',
};
}
}