Files
kimai/src/Entity/CustomerComment.php
Kevin Papst a392f61d61 Release 2.0.31 (#4245)
* replace strings by class references
* allow 64 chars for username
* fix time can be optional and null
* fix timezone is not respected
* bump version
* fix br in attribute
* support different visible duration from booked duration
* fix image URL
2023-08-21 20:24:24 +02:00

39 lines
947 B
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Table(name: 'kimai2_customers_comments')]
#[ORM\Index(columns: ['customer_id'])]
#[ORM\Entity]
#[ORM\ChangeTrackingPolicy('DEFERRED_EXPLICIT')]
class CustomerComment implements CommentInterface
{
use CommentTableTypeTrait;
#[ORM\ManyToOne(targetEntity: Customer::class)]
#[ORM\JoinColumn(onDelete: 'CASCADE', nullable: false)]
#[Assert\NotNull]
private Customer $customer;
public function __construct(Customer $customer)
{
$this->createdAt = new \DateTime();
$this->customer = $customer;
}
public function getCustomer(): Customer
{
return $this->customer;
}
}