forked from php-enqueue/enqueue-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJob.php
More file actions
108 lines (92 loc) · 2.03 KB
/
Job.php
File metadata and controls
108 lines (92 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
namespace Enqueue\Bundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Enqueue\JobQueue\Job as BaseJob;
/**
* @ORM\Entity
* @ORM\Table(name="enqueue_job")
*/
class Job extends BaseJob
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="owner_id", type="string", nullable=true)
*/
protected $ownerId;
/**
* @var string
*
* @ORM\Column(name="name", type="string", nullable=false)
*/
protected $name;
/**
* @var string
*
* @ORM\Column(name="status", type="string", nullable=false)
*/
protected $status;
/**
* @var bool
*
* @ORM\Column(name="interrupted", type="boolean")
*/
protected $interrupted;
/**
* @var bool;
*
* @ORM\Column(name="`unique`", type="boolean")
*/
protected $unique;
/**
* @var Job
*
* @ORM\ManyToOne(targetEntity="Job", inversedBy="childJobs")
* @ORM\JoinColumn(name="root_job_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $rootJob;
/**
* @var Job[]
*
* @ORM\OneToMany(targetEntity="Job", mappedBy="rootJob")
*/
protected $childJobs;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var \DateTime
*
* @ORM\Column(name="started_at", type="datetime", nullable=true)
*/
protected $startedAt;
/**
* @var \DateTime
*
* @ORM\Column(name="stopped_at", type="datetime", nullable=true)
*/
protected $stoppedAt;
/**
* @var array
*
* @ORM\Column(name="data", type="json_array", nullable=true)
*/
protected $data;
public function __construct()
{
parent::__construct();
$this->childJobs = new ArrayCollection();
}
}