mirror of
https://github.com/Karaka-Management/oms-Calendar.git
synced 2026-02-15 16:08:41 +00:00
Unit test bug fixes
This commit is contained in:
parent
7b8dfd81ea
commit
9b4ff04bfc
|
|
@ -47,7 +47,7 @@ class Installer extends InstallerAbstract
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'calendar` (
|
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'calendar` (
|
||||||
`calendar_id` int(11) NOT NULL AUTO_INCREMENT,
|
`calendar_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`calendar_name` varchar(25) NOT NULL,
|
`calendar_name` varchar(25) NOT NULL,
|
||||||
`calendar_password` varchar(64) NOT NULL,
|
`calendar_password` varchar(64) DEFAULT NULL,
|
||||||
`calendar_description` varchar(255) NOT NULL,
|
`calendar_description` varchar(255) NOT NULL,
|
||||||
`calendar_created_by` int(11) NOT NULL,
|
`calendar_created_by` int(11) NOT NULL,
|
||||||
`calendar_created_at` datetime NOT NULL,
|
`calendar_created_at` datetime NOT NULL,
|
||||||
|
|
@ -108,7 +108,7 @@ class Installer extends InstallerAbstract
|
||||||
`calendar_event_created_by` int(11) NOT NULL,
|
`calendar_event_created_by` int(11) NOT NULL,
|
||||||
`calendar_event_created_at` datetime NOT NULL,
|
`calendar_event_created_at` datetime NOT NULL,
|
||||||
`calendar_event_schedule` int(11) NOT NULL,
|
`calendar_event_schedule` int(11) NOT NULL,
|
||||||
`calendar_event_calendar` int(11) NOT NULL,
|
`calendar_event_calendar` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`calendar_event_id`),
|
PRIMARY KEY (`calendar_event_id`),
|
||||||
KEY `calendar_event_created_by` (`calendar_event_created_by`),
|
KEY `calendar_event_created_by` (`calendar_event_created_by`),
|
||||||
KEY `calendar_event_schedule` (`calendar_event_schedule`),
|
KEY `calendar_event_schedule` (`calendar_event_schedule`),
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,14 @@ class Calendar
|
||||||
*/
|
*/
|
||||||
private $date = null;
|
private $date = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Password
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $password = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Events.
|
* Events.
|
||||||
*
|
*
|
||||||
|
|
@ -132,6 +140,28 @@ class Calendar
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function getPassword()
|
||||||
|
{
|
||||||
|
return $this->password;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $password Calendar password/title
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function setPassword($password)
|
||||||
|
{
|
||||||
|
$this->password = $password;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
*/
|
*/
|
||||||
namespace Modules\Calendar\Models;
|
namespace Modules\Calendar\Models;
|
||||||
|
|
||||||
use Modules\Calendar\Models\EventMapper;
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\DataStorage\Database\Query\Column;
|
use phpOMS\DataStorage\Database\Query\Column;
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ class Event
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $calendar = 0;
|
private $calendar = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* People.
|
* People.
|
||||||
|
|
@ -299,6 +299,7 @@ class Event
|
||||||
public function setCreatedBy(int $createdBy)
|
public function setCreatedBy(int $createdBy)
|
||||||
{
|
{
|
||||||
$this->createdBy = $createdBy;
|
$this->createdBy = $createdBy;
|
||||||
|
$this->schedule->setCreatedBy($this->createdBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ class EventMapper extends DataMapperAbstract
|
||||||
try {
|
try {
|
||||||
$objId = parent::create($obj);
|
$objId = parent::create($obj);
|
||||||
$query = new Builder($this->db);
|
$query = new Builder($this->db);
|
||||||
|
|
||||||
$query->prefix($this->db->getPrefix())
|
$query->prefix($this->db->getPrefix())
|
||||||
->insert(
|
->insert(
|
||||||
'account_permission_account',
|
'account_permission_account',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user