Enhanced entities

This commit is contained in:
Romain Neutron
2011-12-15 18:06:32 +01:00
parent fa9eaf865e
commit cb5ea9ce34
6 changed files with 63 additions and 3 deletions

View File

@@ -294,4 +294,29 @@ class Basket
return $this->validation;
}
/**
* @var boolean $is_read
*/
private $is_read = false;
/**
* Set is_read
*
* @param boolean $isRead
*/
public function setIsRead($isRead)
{
$this->is_read = $isRead;
}
/**
* Get is_read
*
* @return boolean
*/
public function getIsRead()
{
return $this->is_read;
}
}

View File

@@ -21,7 +21,7 @@ require_once __DIR__ . '/../../classes/cache/cacheableInterface.class.php';
require_once __DIR__ . '/../../classes/User/Interface.class.php';
require_once __DIR__ . '/../../classes/User/Adapter.class.php';
class WorkZone
class StoryWorkZone
{
/**
@@ -147,8 +147,14 @@ class WorkZone
public function setRecord(\record_adapter $record)
{
if(!$record->is_grouping())
{
throw new \Exception('Only storie allowed');
}
$this->setRecordId($record->get_record_id());
$this->setSbasId($record->get_sbas_id());
return;
}

View File

@@ -112,4 +112,29 @@ class ValidationParticipant
{
return $this->session;
}
/**
* @var boolean $is_aware
*/
private $is_aware = false;
/**
* Set is_aware
*
* @param boolean $isAware
*/
public function setIsAware($isAware)
{
$this->is_aware = $isAware;
}
/**
* Get is_aware
*
* @return boolean
*/
public function getIsAware()
{
return $this->is_aware;
}
}

View File

@@ -15,6 +15,8 @@ Entities\Basket:
nullable: true
usr_id:
type: integer
is_read:
type: boolean
pusher_id:
type: integer
nullable: true

View File

@@ -1,6 +1,6 @@
Entities\WorkZone:
Entities\StoryWorkZone:
type: entity
table: WorkZone
table: StoryWorkZone
uniqueConstraints:
user_story:
columns: usr_id,sbas_id,record_id

View File

@@ -9,6 +9,8 @@ Entities\ValidationParticipant:
fields:
usr_id:
type: integer
is_aware:
type: boolean
oneToMany:
datases:
targetEntity: ValidationData