Added 'user_id' (created by) and 'create_date' columns to 'project' table.

This commit is contained in:
Dmitry Khomutov 2017-10-19 22:05:00 +07:00
commit dd4f3bfbad
7 changed files with 155 additions and 28 deletions

View file

@ -25,16 +25,22 @@ class ProjectService
/**
* Create a new project model and use the project store to save it.
* @param string $title
* @param string $type
* @param string $reference
* @param array $options
*
* @param string $title
* @param string $type
* @param string $reference
* @param integer $userId
* @param array $options
*
* @return \PHPCensor\Model\Project
*/
public function createProject($title, $type, $reference, $options = [])
public function createProject($title, $type, $reference, $userId, $options = [])
{
// Create base project and use updateProject() to set its properties:
$project = new Project();
$project->setCreateDate(new \DateTime());
$project->setUserId((integer)$userId);
return $this->updateProject($project, $title, $type, $reference, $options);
}