mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-23 20:35:03 +02:00
Made order and pricedetails timestampable.
Further the migration fixes the typos in attachment table names and filled empty timestamps with the current date.
This commit is contained in:
parent
d79f580b30
commit
1776cd9a77
6 changed files with 115 additions and 28 deletions
|
@ -62,6 +62,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\PriceInformations;
|
||||
|
||||
use App\Entity\Base\DBElement;
|
||||
use App\Entity\Base\TimestampTrait;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
@ -72,10 +73,14 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
*
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table("`pricedetails`")
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
* @UniqueEntity(fields={"orderdetail", "min_discount_quantity"})
|
||||
*/
|
||||
class Pricedetail extends DBElement
|
||||
{
|
||||
|
||||
use TimestampTrait;
|
||||
|
||||
/**
|
||||
* @var Orderdetail
|
||||
* @ORM\ManyToOne(targetEntity="Orderdetail", inversedBy="pricedetails")
|
||||
|
@ -118,10 +123,6 @@ class Pricedetail extends DBElement
|
|||
*/
|
||||
protected $manual_input;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetimetz")
|
||||
*/
|
||||
protected $last_modified;
|
||||
|
||||
/********************************************************************************
|
||||
*
|
||||
|
@ -303,6 +304,6 @@ class Pricedetail extends DBElement
|
|||
*/
|
||||
public function getIDString(): string
|
||||
{
|
||||
return 'PD'.sprintf('%06d', $this->getID());
|
||||
return 'PD' . sprintf('%06d', $this->getID());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue