src/Entity/LawOffice.php line 16
<?phpnamespace App\Entity;use App\Repository\LawOfficeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[ORM\Entity(repositoryClass: LawOfficeRepository::class)]#[Vich\Uploadable]class LawOffice{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $CreatedAt = null;#[ORM\ManyToOne]private ?LawBarOffice $lawBarOffice = null;#[ORM\Column(length: 255)]private ?string $lawOfficeName = null;#[ORM\Column(nullable: true)]private ?int $status = null;#[ORM\Column(length: 16, nullable: true)]private ?string $officePhoneNumber = null;#[ORM\Column(length: 255, nullable: true)]private ?string $addressLine = null;#[ORM\Column(length: 10, nullable: true)]private ?string $prefix = null;#[ORM\OneToMany(mappedBy: 'LawOffice', targetEntity: User::class)]private Collection $users;// NOTE: This is not a mapped field of entity metadata, just a simple property.#[Vich\UploadableField(mapping: 'lawoffice_avatar', fileNameProperty: 'avatarName', size: 'avatarSize')]private ?File $avatarFile = null;#[ORM\Column(nullable: true)]private ?string $avatarName = null;#[ORM\Column(nullable: true)]private ?int $avatarSize = null;#[ORM\OneToMany(mappedBy: 'LawOffice', targetEntity: Client::class)]private Collection $clients;#[ORM\Column(nullable: true)]private ?int $CaseSeq = null;public function __construct(){$this->users = new ArrayCollection();$this->clients = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getCreatedAt(): ?\DateTimeInterface{return $this->CreatedAt;}public function setCreatedAt(?\DateTimeInterface $CreatedAt): self{$this->CreatedAt = $CreatedAt;return $this;}public function getLawBarOffice(): ?LawBarOffice{return $this->lawBarOffice;}public function setLawBarOffice(?LawBarOffice $lawBarOffice): self{$this->lawBarOffice = $lawBarOffice;return $this;}public function getLawOfficeName(): ?string{return $this->lawOfficeName;}public function setLawOfficeName(string $lawOfficeName): self{$this->lawOfficeName = $lawOfficeName;return $this;}public function getStatus(): ?int{return $this->status;}public function setStatus(int $status): self{$this->status = $status;return $this;}public function getOfficePhoneNumber(): ?string{return $this->officePhoneNumber;}public function setOfficePhoneNumber(?string $officePhoneNumber): self{$this->officePhoneNumber = $officePhoneNumber;return $this;}public function getAddressLine(): ?string{return $this->addressLine;}public function setAddressLine(?string $addressLine): self{$this->addressLine = $addressLine;return $this;}public function getPrefix(): ?string{return $this->prefix;}public function setPrefix(?string $prefix): self{$this->prefix = $prefix;return $this;}/*** @return Collection<int, User>*/public function getUsers(): Collection{return $this->users;}public function addUser(User $user): self{if (!$this->users->contains($user)) {$this->users->add($user);$user->setLawOffice($this);}return $this;}public function removeUser(User $user): self{if ($this->users->removeElement($user)) {// set the owning side to null (unless already changed)if ($user->getLawOffice() === $this) {$user->setLawOffice(null);}}return $this;}/*** If manually uploading a file (i.e. not using Symfony Form) ensure an instance* of 'UploadedFile' is injected into this setter to trigger the update. If this* bundle's configuration parameter 'inject_on_load' is set to 'true' this setter* must be able to accept an instance of 'File' as the bundle will inject one here* during Doctrine hydration.** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $avatarFile*/public function setAvatarFile(?File $avatarFile = null): void{$this->avatarFile = $avatarFile;if (null !== $avatarFile) {// It is required that at least one field changes if you are using doctrine// otherwise the event listeners won't be called and the file is lost$this->updatedAt = new \DateTimeImmutable();}}public function getAvatarFile(): ?File{return $this->avatarFile;}public function setAvatarName(?string $avatarName): void{$this->avatarName = $avatarName;}public function getAvatarName(): ?string{return $this->avatarName;}public function setAvatarSize(?int $avatarSize): void{$this->avatarSize = $avatarSize;}public function getAvatarSize(): ?int{return $this->avatarSize;}/*** @return Collection<int, Client>*/public function getClients(): Collection{return $this->clients;}public function addClient(Client $client): self{if (!$this->clients->contains($client)) {$this->clients->add($client);$client->setLawOffice($this);}return $this;}public function removeClient(Client $client): self{if ($this->clients->removeElement($client)) {// set the owning side to null (unless already changed)if ($client->getLawOffice() === $this) {$client->setLawOffice(null);}}return $this;}public function getCaseSeq(): ?int{return $this->CaseSeq;}public function setCaseSeq(?int $CaseSeq): self{$this->CaseSeq = $CaseSeq;return $this;}}