|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace App\Entity\Project; |
|
4
|
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
6
|
|
|
|
|
7
|
|
|
use App\Model\Project\Project as ProjectModel; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\Project\ProjectRepository") |
|
11
|
|
|
* @ORM\Table(name="project__projects") |
|
12
|
|
|
* @ORM\HasLifecycleCallbacks() |
|
13
|
|
|
*/ |
|
14
|
|
|
class Project extends ProjectModel |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* @ORM\Id |
|
18
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
|
19
|
|
|
* @ORM\Column(type="integer") |
|
20
|
|
|
*/ |
|
21
|
|
|
protected $id; |
|
22
|
|
|
/** |
|
23
|
|
|
* @ORM\Column(name="name", type="string", length=125, unique=true) |
|
24
|
|
|
*/ |
|
25
|
|
|
protected $name; |
|
26
|
|
|
/** |
|
27
|
|
|
* @ORM\Column(name="slug", type="string", length=125, unique=true) |
|
28
|
|
|
*/ |
|
29
|
|
|
protected $slug; |
|
30
|
|
|
/** |
|
31
|
|
|
* @ORM\Column(name="description", type="text") |
|
32
|
|
|
*/ |
|
33
|
|
|
protected $description; |
|
34
|
|
|
/** |
|
35
|
|
|
* @ORM\OneToMany(targetEntity="Details", mappedBy="project", fetch="LAZY") |
|
36
|
|
|
*/ |
|
37
|
|
|
protected $details; |
|
38
|
|
|
/** |
|
39
|
|
|
* @ORM\OneToOne(targetEntity="Poll") |
|
40
|
|
|
* @ORM\JoinColumn(onDelete="SET NULL") |
|
41
|
|
|
*/ |
|
42
|
|
|
protected $approvalPoll; |
|
43
|
|
|
/** |
|
44
|
|
|
* @ORM\Column(name="created_at", type="datetime") |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $createdAt; |
|
47
|
|
|
/** |
|
48
|
|
|
* @ORM\Column(name="updated_at", type="datetime") |
|
49
|
|
|
*/ |
|
50
|
|
|
protected $updatedAt; |
|
51
|
|
|
/** |
|
52
|
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\User\User") |
|
53
|
|
|
*/ |
|
54
|
|
|
protected $productOwner; |
|
55
|
|
|
/** |
|
56
|
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Organization") |
|
57
|
|
|
* @ORM\JoinColumn(nullable=true) |
|
58
|
|
|
*/ |
|
59
|
|
|
protected $organization; |
|
60
|
|
|
/** |
|
61
|
|
|
* @ORM\OneToMany(targetEntity="App\Entity\Project\BetaTest", mappedBy="project") |
|
62
|
|
|
*/ |
|
63
|
|
|
protected $betaTests; |
|
64
|
|
|
/** |
|
65
|
|
|
* @ORM\OneToMany(targetEntity="App\Entity\Project\Feature", mappedBy="project") |
|
66
|
|
|
*/ |
|
67
|
|
|
protected $features; |
|
68
|
|
|
/** |
|
69
|
|
|
* @ORM\OneToMany(targetEntity="App\Entity\Project\Feedback", mappedBy="project") |
|
70
|
|
|
*/ |
|
71
|
|
|
protected $feedbacks; |
|
72
|
|
|
/** |
|
73
|
|
|
* @ORM\OneToMany(targetEntity="App\Entity\Project\Repository", mappedBy="project") |
|
74
|
|
|
*/ |
|
75
|
|
|
protected $repositories; |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @ORM\PrePersist() |
|
79
|
|
|
*/ |
|
80
|
2 |
|
public function prePersist() |
|
81
|
|
|
{ |
|
82
|
2 |
|
$this->createdAt = $this->updatedAt = new \DateTime(); |
|
83
|
2 |
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* @ORM\PreUpdate() |
|
87
|
|
|
*/ |
|
88
|
1 |
|
public function preUpdate() |
|
89
|
|
|
{ |
|
90
|
1 |
|
$this->updatedAt = new \DateTime(); |
|
91
|
1 |
|
} |
|
92
|
|
|
|
|
93
|
9 |
|
public function setId(int $id): Project |
|
94
|
|
|
{ |
|
95
|
9 |
|
$this->id = $id; |
|
96
|
|
|
|
|
97
|
9 |
|
return $this; |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
7 |
|
public function getId(): int |
|
101
|
|
|
{ |
|
102
|
7 |
|
return $this->id; |
|
103
|
|
|
} |
|
104
|
|
|
} |