-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathTicket.php
84 lines (68 loc) · 1.45 KB
/
Ticket.php
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
<?php
declare(strict_types=1);
namespace Meilisearch\Bundle\Tests\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
#[ORM\Entity]
class Ticket
{
/**
* @ORM\Id
*
* @ORM\Column(type="integer")
*/
#[ORM\Id]
#[ORM\Column(type: Types::INTEGER)]
private int $id;
/**
* @ORM\Column(type="string")
*/
#[ORM\Column(type: Types::STRING)]
private string $barcode;
/**
* @ORM\Column(type="boolean", options={"default"=false})
*/
#[ORM\Column(type: Types::BOOLEAN, options: ['default' => false])]
private bool $sold;
/**
* @param int $id
* @param string $barcode
* @param bool $sold
*/
public function __construct(int $id, string $barcode, bool $sold)
{
$this->id = $id;
$this->barcode = $barcode;
$this->sold = $sold;
}
public function getId(): int
{
return $this->id;
}
public function setId(int $id): Ticket
{
$this->id = $id;
return $this;
}
public function getBarcode(): string
{
return $this->barcode;
}
public function setBarcode(string $barcode): Ticket
{
$this->barcode = $barcode;
return $this;
}
public function isSold(): bool
{
return $this->sold;
}
public function setSold(bool $sold): Ticket
{
$this->sold = $sold;
return $this;
}
}