|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Developtech\AgilityBundle\Entity; |
|
4
|
|
|
|
|
5
|
|
|
use Developtech\AgilityBundle\Model\JobModel; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* @ORM\Entity() |
|
11
|
|
|
* @ORM\Table(name="developtech_agility__jobs") |
|
12
|
|
|
* @ORM\InheritanceType("JOINED") |
|
13
|
|
|
* @ORM\DiscriminatorColumn(name="type", type="string", length=2) |
|
14
|
|
|
* @ORM\DiscriminatorMap({ |
|
15
|
|
|
* "US" = "Feature", |
|
16
|
|
|
* "FB" = "Feedback" |
|
17
|
|
|
* }) |
|
18
|
|
|
* @ORM\HasLifecycleCallbacks |
|
19
|
|
|
*/ |
|
20
|
|
|
abstract class Job extends JobModel { |
|
21
|
|
|
/** |
|
22
|
|
|
* @ORM\Column(name="id", type="integer") |
|
23
|
|
|
* @ORM\Id |
|
24
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
|
25
|
|
|
*/ |
|
26
|
|
|
protected $id; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @ORM\Column(name="name", type="string", length=125) |
|
30
|
|
|
*/ |
|
31
|
|
|
protected $name; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @ORM\Column(name="slug", type="string", length=125) |
|
35
|
|
|
*/ |
|
36
|
|
|
protected $slug; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @ORM\Column(name="description", type="string", length=255) |
|
40
|
|
|
*/ |
|
41
|
|
|
protected $description; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @ORM\Column(name="status", type="integer") |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $status; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @ORM\Column(name="createdAt", type="datetime") |
|
50
|
|
|
*/ |
|
51
|
|
|
protected $createdAt; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @ORM\Column(name="updatedAt", type="datetime") |
|
55
|
|
|
*/ |
|
56
|
|
|
protected $updatedAt; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* @var Project |
|
60
|
|
|
* |
|
61
|
|
|
* @ORM\ManyToOne(targetEntity="Developtech\AgilityBundle\Entity\Project", inversedBy="feedbacks") |
|
62
|
|
|
*/ |
|
63
|
|
|
protected $project; |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @ORM\PrePersist() |
|
67
|
|
|
*/ |
|
68
|
1 |
|
public function prePersist() { |
|
69
|
1 |
|
$this->createdAt = $this->updatedAt = new \DateTime(); |
|
70
|
1 |
|
} |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* @ORM\PreUpdate() |
|
74
|
|
|
*/ |
|
75
|
|
|
public function preUpdate() { |
|
76
|
|
|
$this->updatedAt = new \DateTime(); |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @param integer $id |
|
81
|
|
|
* @return FeedbackModel |
|
82
|
|
|
*/ |
|
83
|
8 |
|
public function setId($id) { |
|
84
|
8 |
|
$this->id = $id; |
|
85
|
|
|
|
|
86
|
8 |
|
return $this; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* Get id |
|
91
|
|
|
* |
|
92
|
|
|
* @return int |
|
93
|
|
|
*/ |
|
94
|
7 |
|
public function getId() |
|
95
|
|
|
{ |
|
96
|
7 |
|
return $this->id; |
|
97
|
|
|
} |
|
98
|
|
|
} |
|
99
|
|
|
|