enhanced administration of activities/projects/customers added navbar for active records and recent activities added edit timesheet entry form added translation packages for errors and flashmessages upgraded composer packages
229 lines
3.8 KiB
PHP
229 lines
3.8 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Kimai package.
|
|
*
|
|
* (c) Kevin Papst <kevin@kevinpapst.de>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace TimesheetBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* Project
|
|
*
|
|
* @ORM\Table(name="projects")
|
|
* @ORM\Entity(repositoryClass="TimesheetBundle\Repository\ProjectRepository")
|
|
*
|
|
* @author Kevin Papst <kevin@kevinpapst.de>
|
|
*/
|
|
class Project
|
|
{
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="IDENTITY")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var Customer
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="TimesheetBundle\Entity\Customer", inversedBy="projects")
|
|
*/
|
|
private $customer;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="name", type="string", length=255, nullable=false)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="comment", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $comment;
|
|
|
|
/**
|
|
* @var boolean
|
|
*
|
|
* @ORM\Column(name="visible", type="boolean", nullable=false)
|
|
*/
|
|
private $visible = true;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="budget", type="decimal", precision=10, scale=2, nullable=false)
|
|
*/
|
|
private $budget = 0.00;
|
|
|
|
/**
|
|
* @var Activity[]
|
|
*
|
|
* @ORM\OneToMany(targetEntity="TimesheetBundle\Entity\Activity", mappedBy="project", cascade={"persist", "merge", "remove"})
|
|
*/
|
|
private $activities;
|
|
|
|
/**
|
|
* Get projectid
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* @return Customer
|
|
*/
|
|
public function getCustomer()
|
|
{
|
|
return $this->customer;
|
|
}
|
|
|
|
/**
|
|
* @param $customer
|
|
* @return $this
|
|
*/
|
|
public function setCustomer($customer)
|
|
{
|
|
$this->customer = $customer;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set name
|
|
*
|
|
* @param string $name
|
|
*
|
|
* @return Project
|
|
*/
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Set comment
|
|
*
|
|
* @param string $comment
|
|
*
|
|
* @return Project
|
|
*/
|
|
public function setComment($comment)
|
|
{
|
|
$this->comment = $comment;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get comment
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getComment()
|
|
{
|
|
return $this->comment;
|
|
}
|
|
|
|
/**
|
|
* Set visible
|
|
*
|
|
* @param boolean $visible
|
|
*
|
|
* @return Project
|
|
*/
|
|
public function setVisible($visible)
|
|
{
|
|
$this->visible = $visible;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get visible
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function getVisible()
|
|
{
|
|
return $this->visible;
|
|
}
|
|
|
|
/**
|
|
* Set budget
|
|
*
|
|
* @param string $budget
|
|
*
|
|
* @return Project
|
|
*/
|
|
public function setBudget($budget)
|
|
{
|
|
$this->budget = $budget;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get budget
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getBudget()
|
|
{
|
|
return $this->budget;
|
|
}
|
|
|
|
/**
|
|
* @param Activity[] $activities
|
|
* @return $this
|
|
*/
|
|
public function setActivities($activities)
|
|
{
|
|
$this->activities = $activities;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Activity[]
|
|
*/
|
|
public function getActivities()
|
|
{
|
|
return $this->activities;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function __toString()
|
|
{
|
|
return $this->getName();
|
|
}
|
|
}
|