1 | <?php |
||
14 | class PaymentLine extends BasePaymentLine |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | * |
||
19 | * @ORM\Id |
||
20 | * @ORM\Column(name="id", type="integer") |
||
21 | * @ORM\GeneratedValue(strategy="AUTO") |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @Assert\NotBlank() |
||
27 | * @Assert\Length(max="191") |
||
28 | * |
||
29 | * @ORM\Column(type="string", length=191) |
||
30 | */ |
||
31 | protected $productNumber; |
||
32 | |||
33 | /** |
||
34 | * @Assert\NotBlank() |
||
35 | * @Assert\Length(max="191") |
||
36 | * |
||
37 | * @ORM\Column(type="string", length=191) |
||
38 | */ |
||
39 | protected $name; |
||
40 | |||
41 | /** |
||
42 | * @Assert\NotBlank() |
||
43 | * @Assert\GreaterThan(0) |
||
44 | * |
||
45 | * @ORM\Column(type="integer") |
||
46 | */ |
||
47 | protected $quantity; |
||
48 | |||
49 | /** |
||
50 | * @Assert\NotBlank() |
||
51 | * |
||
52 | * @ORM\Column(type="decimal", precision=12, scale=2) |
||
53 | */ |
||
54 | protected $price; |
||
55 | |||
56 | /** |
||
57 | * @Assert\NotBlank() |
||
58 | * @Assert\GreaterThanOrEqual(0) |
||
59 | * |
||
60 | * @ORM\Column(type="integer") |
||
61 | */ |
||
62 | protected $vat; |
||
63 | |||
64 | /** |
||
65 | * @Assert\NotNull() |
||
66 | * |
||
67 | * @ORM\JoinColumn(nullable=false, onDelete="CASCADE") |
||
68 | * @ORM\ManyToOne(targetEntity="Payment", inversedBy="paymentLines") |
||
69 | */ |
||
70 | protected $payment; |
||
71 | |||
72 | /** |
||
73 | * This will transform a Dandomain Payment Line (parent) to a Payment Line (child). |
||
74 | * |
||
75 | * @param DandomainPaymentLine $dandomainPaymentLine |
||
76 | * |
||
77 | * @return PaymentLine |
||
78 | */ |
||
79 | public static function createFromDandomainPaymentLine(DandomainPaymentLine $dandomainPaymentLine) |
||
104 | |||
105 | /** |
||
106 | * @return int |
||
107 | */ |
||
108 | public function getId() : ?int |
||
112 | |||
113 | /** |
||
114 | * @param mixed $id |
||
115 | * @return PaymentLine |
||
116 | */ |
||
117 | public function setId($id) : self |
||
122 | } |
||
123 |