mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-02-12 19:28:39 +00:00
Use global namespace+minor fixes
This commit is contained in:
parent
5e25c7160a
commit
6076f244c4
|
|
@ -216,7 +216,7 @@ class Report implements \JsonSerializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return int|\phpOMS\Account\Account
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -293,6 +293,9 @@ class Report implements \JsonSerializable
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return $this->toArray();
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,12 @@ final class ReportMapper extends DataMapperAbstract
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Belongs to.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
protected static $belongsTo = [
|
protected static $belongsTo = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ class Template implements \JsonSerializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return int|\phpOMS\Account\Account
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -373,17 +373,20 @@ class Template implements \JsonSerializable
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'createdBy' => $this->createdBy,
|
'createdBy' => $this->createdBy,
|
||||||
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'),
|
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'),
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
'datatype' => $this->datatype,
|
'datatype' => $this->datatype,
|
||||||
'standalone' => $this->isStandalone,
|
'standalone' => $this->isStandalone,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return $this->toArray();
|
return $this->toArray();
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,12 @@ final class TemplateMapper extends DataMapperAbstract
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Belongs to.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
protected static $belongsTo = [
|
protected static $belongsTo = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
|
|
@ -63,7 +69,12 @@ final class TemplateMapper extends DataMapperAbstract
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has many relation.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
'reports' => [
|
'reports' => [
|
||||||
'mapper' => ReportMapper::class,
|
'mapper' => ReportMapper::class,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user