Facebook
From bejke, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 140
  1. <?php
  2.  
  3. namespace AppEntity;
  4.  
  5. use AppRepositoryGameRepository;
  6. use DoctrineDBALTypesTypes;
  7. use DoctrineORMMapping as ORM;
  8.  
  9. #[ORMEntity(repositoryClass: GameRepository::class)]
  10. class Game
  11. {
  12.     #[ORMId]
  13.     #[ORMGeneratedValue]
  14.     #[ORMColumn]
  15.     private ?int $id = null;
  16.  
  17.     #[ORMColumn(type: Types::DATETIME_MUTABLE)]
  18.     private ?DateTimeInterface $datetime_start = null;
  19.  
  20.     #[ORMColumn(type: Types::DATETIME_MUTABLE)]
  21.     private ?DateTimeInterface $datetime_stop = null;
  22.  
  23.     #[ORMColumn(length: 255, nullable: true)]
  24.     private ?string $status = null;
  25.  
  26.     #[ORMManyToOne(inversedBy: 'games')]
  27.     private ?User $updatedby_id = null;
  28.  
  29.     #[ORMOneToOne(cascade: ['persist', 'remove'])]
  30.     private ?GameType $game_type = null;
  31.  
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.  
  37.     public function getDatetimeStart(): ?DateTimeInterface
  38.     {
  39.         return $this->datetime_start;
  40.     }
  41.  
  42.     public function setDatetimeStart(DateTimeInterface $datetime_start): static
  43.     {
  44.         $this->datetime_start = $datetime_start;
  45.  
  46.         return $this;
  47.     }
  48.  
  49.     public function getDatetimeStop(): ?DateTimeInterface
  50.     {
  51.         return $this->datetime_stop;
  52.     }
  53.  
  54.     public function setDatetimeStop(DateTimeInterface $datetime_stop): static
  55.     {
  56.         $this->datetime_stop = $datetime_stop;
  57.  
  58.         return $this;
  59.     }
  60.  
  61.     public function getStatus(): ?string
  62.     {
  63.         return $this->status;
  64.     }
  65.  
  66.     public function setStatus(?string $status): static
  67.     {
  68.         $this->status = $status;
  69.  
  70.         return $this;
  71.     }
  72.  
  73.     public function getUpdatedbyId(): ?User
  74.     {
  75.         return $this->updatedby_id;
  76.     }
  77.  
  78.     public function setUpdatedbyId(?User $updatedby_id): static
  79.     {
  80.         $this->updatedby_id = $updatedby_id;
  81.  
  82.         return $this;
  83.     }
  84.  
  85.     public function getGameType(): ?GameType
  86.     {
  87.         return $this->game_type;
  88.     }
  89.  
  90.     public function setGameType(?GameType $game_type): static
  91.     {
  92.         $this->game_type = $game_type;
  93.  
  94.         return $this;
  95.     }
  96. }
  97.