caisse-bliss/nope/Entity/ExpenseKind.php

216 lines
3.4 KiB
PHP
Raw Normal View History

2018-08-22 16:42:21 +02:00
<?php
2023-06-20 19:14:19 +02:00
namespace App\Entity;
2018-08-22 16:42:21 +02:00
use Doctrine\ORM\Mapping as ORM;
/**
* ExpenseKind, for previsional compta
2018-08-22 16:42:21 +02:00
*
* @ORM\Table(name="expense_kind")
2023-06-20 19:14:19 +02:00
* @ORM\Entity(repositoryClass="App\Repository\ExpenseKindRepository")
2018-08-22 16:42:21 +02:00
*/
class ExpenseKind
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* @var int|null
*
* @ORM\Column(name="delay", type="integer", nullable=true)
*/
private $delay;
2018-08-27 14:58:45 +02:00
/**
* line enabled to calculate on
*
* @ORM\Column(name="enabled", type="boolean", nullable=true)
*/
private $enabled;
2018-08-22 16:42:21 +02:00
/**
* @var int|null
*
* @ORM\Column(name="repeatitions", type="integer", nullable=true)
*/
private $repeatitions;
/**
* @var float
*
* @ORM\Column(name="amount", type="float")
*/
private $amount;
/**
2023-06-20 19:14:19 +02:00
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="expenses")
2018-08-22 16:42:21 +02:00
*/
private $user;
2023-06-28 16:16:11 +02:00
#[ORM\ManyToOne(inversedBy: 'expenseKind')]
private ?Admin $admin = null;
2018-08-27 14:58:45 +02:00
/**
* @return int|null
*/
public function getEnabled()
{
return $this->enabled;
}
/**
* @param int|null $enabled
*/
public function setEnabled($enabled)
{
$this->enabled = $enabled;
}
2018-08-22 16:42:21 +02:00
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user)
{
$this->user = $user;
}
/**
* Set name.
*
* @param string $name
*
* @return ExpenseKind
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name.
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set delay.
*
* @param int|null $delay
*
* @return ExpenseKind
*/
public function setDelay($delay = null)
{
$this->delay = $delay;
return $this;
}
/**
* Get delay.
*
* @return int|null
*/
public function getDelay()
{
return $this->delay;
}
/**
* Set repeatitions.
*
* @param int|null $repeatitions
*
* @return ExpenseKind
*/
public function setRepeatitions($repeatitions = null)
{
$this->repeatitions = $repeatitions;
return $this;
}
/**
* Get repeatitions.
*
* @return int|null
*/
public function getRepeatitions()
{
return $this->repeatitions;
}
/**
* Set amount.
*
* @param float $amount
*
* @return ExpenseKind
*/
public function setAmount($amount)
{
$this->amount = $amount;
return $this;
}
/**
* Get amount.
*
* @return float
*/
public function getAmount()
{
return $this->amount;
}
2023-06-28 16:16:11 +02:00
public function getAdmin(): ?Admin
{
return $this->admin;
}
public function setAdmin(?Admin $admin): static
{
$this->admin = $admin;
return $this;
}
2018-08-22 16:42:21 +02:00
}