<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use App\Entity\Traits\DeleteTrait;use App\Entity\Traits\TranslateTrait;use App\Entity\Traits\FileUploadTrait;use Gedmo\Mapping\Annotation as Gedmo;use App\Repository\EnquiryCVRepository;use Gedmo\Timestampable\Traits\TimestampableEntity;use Symfony\Component\Validator\Constraints as Assert;/** * @Gedmo\Loggable */#[ORM\Entity(repositoryClass: EnquiryCVRepository::class)]class EnquiryCV{ use TimestampableEntity; use TranslateTrait; use FileUploadTrait; use DeleteTrait; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type:"integer")] private $id; #[Assert\NotBlank(message: 'Your name should not be blank')] #[Assert\Length(min: 3, minMessage: 'Your name must be at least {{ limit }} characters long')] #[ORM\Column(name: 'name', type: 'string', length: 255)] private string $name; #[Assert\NotBlank(message: 'Your Email should not be blank')] #[Assert\Email(message: "The email '{{ value }}' is not a valid email.")] #[ORM\Column(name: 'email', type: 'string', length: 255)] private string $email; #[Assert\NotBlank(message: 'Contact number should not be blank')] #[ORM\Column(name: 'contact_number', type: 'string', length: 255)] private string $contactNumber; #[Assert\NotBlank(message: 'About you should not be blank')] #[Assert\Length(min: 10, minMessage: 'About you must be at least {{ limit }} characters long')] #[ORM\Column(name: 'aboutYou', type: 'text')] private string $aboutYou; #[ORM\Column(type: 'boolean')] private $viewed = false; public function __construct() { $this->viewed = false; } public 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 getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getContactNumber(): ?string { return $this->contactNumber; } public function setContactNumber(string $contactNumber): self { $this->contactNumber = $contactNumber; return $this; } public function getAboutYou(): ?string { return $this->aboutYou; } public function setAboutYou(string $aboutYou): self { $this->aboutYou = $aboutYou; return $this; } // OVERRIDE FILE UPLOAD TRAIT public function getFolder(): string { $classname = strtolower( (new \ReflectionClass($this))->getShortName() ); return '/../cvs'; } public function getViewed(): ?bool { return $this->viewed; } public function setViewed(bool $viewed): self { $this->viewed = $viewed; return $this; }}