Source of file CrudObject.php
Size: 3,600 Bytes - Last Modified: 2023-11-16T22:56:02+01:00
/home/websites/teicee/packagist/site/phpdoc/conf/../vendor/teicee/demo-bundle/src/Entity/CrudObject.php
| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 | <?phpnamespace TIC\DemoBundle\Entity; use TIC\DormBundle\Base\TICEntity as BaseEntity; use TIC\DemoBundle\Repository\CrudObjectRepository as EntityRepo; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Table(name="tic_demo_crud_object") * @ORM\Entity(repositoryClass=EntityRepo::class) * @ORM\HasLifecycleCallbacks */class CrudObject extends BaseEntity {use \TIC\DormBundle\Traits\EntityTimestampable; // require @ORM\HasLifecycleCallbacks use \TIC\DormBundle\Traits\EntityEnabled; // --------------------------------------------------------------------- Properties/** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */private $id; /** * @ORM\Column(type="string", length=100) */private $name; /** * @ORM\Column(type="string", length=50, nullable=true) */private $category; /** * @ORM\Column(type="text", nullable=true) */private $description; /** * @ORM\Column(type="text", nullable=true) */private $comment; /** * @ORM\Column(type="smallint", nullable=true) */private $score; /** * @ORM\Column(type="integer") */private $quantity; /** * @ORM\Column(type="decimal", scale=2, precision=6) */private $price; /** * @ORM\Column(type="date") */private $since; /** * @ORM\Column(type="datetime") */private $publishedAt; // --------------------------------------------------------------------- Custom methodspublic function __construct() { } public function __toString() { return $this->getName(); } // --------------------------------------------------------------------- Shortcut methods// --------------------------------------------------------------------- Tweaked methods// --------------------------------------------------------------------- Auto-generatedpublic function getId(): ?int {return $this->id; }public function getName(): ?string {return $this->name; }public function setName(string $name): self {$this->name = $name; return $this; }public function getCategory(): ?string {return $this->category; }public function setCategory(?string $category): self {$this->category = $category; return $this; }public function getDescription(): ?string {return $this->description; }public function setDescription(?string $description): self {$this->description = $description; return $this; }public function getComment(): ?string {return $this->comment; }public function setComment(?string $comment): self {$this->comment = $comment; return $this; }public function getScore(): ?int {return $this->score; }public function setScore(?int $score): self {$this->score = $score; return $this; }public function getQuantity(): ?int {return $this->quantity; }public function setQuantity(int $quantity): self {$this->quantity = $quantity; return $this; }public function getPrice(): ?string {return $this->price; }public function setPrice(string $price): self {$this->price = $price; return $this; }public function getSince(): ?\DateTimeInterface { return $this->since; } public function setSince(\DateTimeInterface $since): self { $this->since = $since; return $this; } public function getPublishedAt(): ?\DateTimeInterface { return $this->publishedAt; } public function setPublishedAt(\DateTimeInterface $publishedAt): self { $this->publishedAt = $publishedAt; return $this; } } |