You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			37 lines
		
	
	
		
			594 B
		
	
	
	
		
			PHP
		
	
			
		
		
	
	
			37 lines
		
	
	
		
			594 B
		
	
	
	
		
			PHP
		
	
| <?php
 | |
| namespace App\Entity;
 | |
| 
 | |
| use Doctrine\ORM\Mapping as ORM;
 | |
| use Doctrine\ORM\Mapping\JoinColumn;
 | |
| use Doctrine\ORM\Mapping\ManyToOne;
 | |
| 
 | |
| #[ORM\Entity]
 | |
| class Character extends Thing
 | |
| {
 | |
| 
 | |
|     #[ManyToOne()]
 | |
|     #[JoinColumn(onDelete: 'cascade')]
 | |
|     public ?Dojo $dojo;
 | |
| 
 | |
|     /**
 | |
|      * Calculates the aged based on the ulid value?
 | |
|      */
 | |
|     public function getAge(): int
 | |
|     {
 | |
|         return 17;
 | |
|     }
 | |
| 
 | |
|     public function getDojo(): ?Dojo
 | |
|     {
 | |
|         return $this->dojo;
 | |
|     }
 | |
| 
 | |
|     public function setDojo(?Dojo $dojo): static
 | |
|     {
 | |
|         $this->dojo = $dojo;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| }
 | |
| 
 |