src/Entity/Cryptocurrency.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CryptocurrencyRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Traits\DateTimeTrait;
  7. use Overblog\GraphQLBundle\Annotation\Field;
  8. use App\Attribute\Searchable;
  9. #[ORM\Entity(repositoryClassCryptocurrencyRepository::class)]
  10. class Cryptocurrency extends BasicEntity
  11. {
  12.     use DateTimeTrait;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\ManyToOne(targetEntityOrganisation::class, inversedBy"cryptocurrencys")]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private $organisation;
  20.     #[ORM\Column]
  21.     private ?\DateTimeImmutable $detectedAt null;
  22.     #[ORM\Column(typeTypes::TEXT)]
  23.     private ?string $location null;
  24.     #[ORM\Column(typeTypes::TEXT)]
  25.     private ?string $fragment null;
  26.     #[ORM\Column(type'string'length255)]
  27.     private ?string $network null;
  28.     #[ORM\Column(type'string'length255)]
  29.     #[Field(name"address"type"string")]
  30.     #[Searchable(name'address')]
  31.     private ?string $address null;
  32.     #[ORM\ManyToOne(targetEntityStatus::class, inversedBy'cryptocurrencys')]
  33.     #[ORM\JoinColumn(nullabletrueoptions: ['default' => 1])]
  34.     #[Field(name"status")]
  35.     private $status;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getOrganisation(): ?Organisation
  41.     {
  42.         return $this->organisation;
  43.     }
  44.     public function setOrganisation(?Organisation $organisation): self
  45.     {
  46.         $this->organisation $organisation;
  47.         return $this;
  48.     }
  49.     public function getDetectedAt(): ?\DateTimeImmutable
  50.     {
  51.         return $this->detectedAt;
  52.     }
  53.     public function setDetectedAt(\DateTimeImmutable $detectedAt): static
  54.     {
  55.         $this->detectedAt $detectedAt;
  56.         return $this;
  57.     }
  58.     public function getLocation(): ?string
  59.     {
  60.         return $this->location;
  61.     }
  62.     public function setLocation(string $location): static
  63.     {
  64.         $this->location $location;
  65.         return $this;
  66.     }
  67.     public function getFragment(): ?string
  68.     {
  69.         return $this->fragment;
  70.     }
  71.     public function setFragment(string $fragment): static
  72.     {
  73.         $this->fragment $fragment;
  74.         return $this;
  75.     }
  76.     public function getNetwork(): ?string
  77.     {
  78.         return $this->network;
  79.     }
  80.     public function setNetwork(string $network): static
  81.     {
  82.         $this->network $network;
  83.         return $this;
  84.     }
  85.     public function getAddress(): ?string
  86.     {
  87.         return $this->address;
  88.     }
  89.     public function setAddress(string $address): static
  90.     {
  91.         $this->address $address;
  92.         return $this;
  93.     }
  94.     public function getStatus(): ?Status
  95.     {
  96.         return $this->status;
  97.     }
  98.     public function setStatus(?Status $status): self
  99.     {
  100.         $this->status $status;
  101.         return $this;
  102.     }
  103. }