<?phpnamespace JanusHercules\IntegratedExternalPartnerCustomers\Domain\Entity;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity]#[ORM\Table(name: 'weclapp_cost_items')]class WeclappCostItem{ public function __construct( string $id, WeclappContract $weclappContract, int $articleId, float $netAmount, int $discountPercentage ) { $this->id = $id; $this->weclappContract = $weclappContract; $this->articleId = $articleId; $this->netAmount = $netAmount; $this->discountPercentage = $discountPercentage; } #[ORM\Id] #[ORM\Column( type: Types::STRING )] private string $id; // yes, all weclapp IDs are seemingly numeric, but the API defines them as type string public function getId(): string { return $this->id; } #[ORM\ManyToOne( targetEntity: WeclappContract::class, cascade : ['persist'] )] #[ORM\JoinColumn( name : 'weclapp_contracts_id', referencedColumnName: 'id', onDelete : 'CASCADE' )] private WeclappContract $weclappContract; public function getWeclappContract(): WeclappContract { return $this->weclappContract; } public function setWeclappContract(WeclappContract $weclappContract): void { $this->weclappContract = $weclappContract; } #[ORM\Column( type: Types::INTEGER )] private int $articleId; public function getArticleId(): int { return $this->articleId; } public function setArticleId(int $articleId): void { $this->articleId = $articleId; } #[ORM\Column( type: Types::FLOAT )] private float $netAmount; public function getNetAmount(): float { return $this->netAmount; } public function setNetAmount(float $netAmount): void { $this->netAmount = $netAmount; } #[ORM\Column( type: Types::INTEGER )] private int $discountPercentage; public function getDiscountPercentage(): int { return $this->discountPercentage; } public function setDiscountPercentage(int $discountPercentage): void { $this->discountPercentage = $discountPercentage; }}