first commit
This commit is contained in:
98
src/Entity/Operation.php
Normal file
98
src/Entity/Operation.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\OperationRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: OperationRepository::class)]
|
||||
class Operation
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $title = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||
private ?\DateTimeInterface $date = null;
|
||||
|
||||
#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2)]
|
||||
private ?string $montant = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'credits')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Accounting $credit = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'debits')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Accounting $debit = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getTitle(): ?string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function setTitle(string $title): static
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTimeInterface $date): static
|
||||
{
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMontant(): ?string
|
||||
{
|
||||
return $this->montant;
|
||||
}
|
||||
|
||||
public function setMontant(string $montant): static
|
||||
{
|
||||
$this->montant = $montant;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCredit(): ?Accounting
|
||||
{
|
||||
return $this->credit;
|
||||
}
|
||||
|
||||
public function setCredit(?Accounting $credit): static
|
||||
{
|
||||
$this->credit = $credit;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDebit(): ?Accounting
|
||||
{
|
||||
return $this->debit;
|
||||
}
|
||||
|
||||
public function setDebit(?Accounting $debit): static
|
||||
{
|
||||
$this->debit = $debit;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user