test fixes and changes for release

This commit is contained in:
Dennis Eichhorn 2022-12-25 00:06:17 +01:00
parent 6d1af49a15
commit 7efb0a2423
2 changed files with 76 additions and 6 deletions

View File

@ -22,9 +22,10 @@ use Modules\Media\Models\NullMedia;
use Modules\Profile\Models\ContactElement;
use Modules\Profile\Models\NullContactElement;
use Modules\Profile\Models\Profile;
use Modules\Admin\Models\Account;
/**
* Account class.
* Client class.
*
* @package Modules\ClientManagement\Models
* @license OMS License 1.0
@ -43,8 +44,6 @@ class Client
private int $type = 0;
private array $ids = [];
public string $info = '';
public \DateTimeImmutable $createdAt;
@ -54,7 +53,7 @@ class Client
/**
* Attributes.
*
* @var int[]|ClientAttribute[]
* @var ClientAttribute[]
* @since 1.0.0
*/
private array $attributes = [];
@ -77,9 +76,9 @@ class Client
private array $partners = [];
private ?Profile $salesRep = null;
public ?Profile $salesRep = null;
private int $advertisementMaterial = 0;
public int $advertisementMaterial = 0;
public ?Address $defaultDeliveryAddress = null;
@ -225,6 +224,58 @@ class Client
return $this->address;
}
/**
* Add partner
*
* @param Account $partner Partner
*
* @return void
*
* @since 1.0.0
*/
public function addPartner(Account $partner) : void
{
$this->partners[] = $partner;
}
/**
* Get partners
*
* @return Account[]
*
* @since 1.0.0
*/
public function getPartners() : array
{
return $this->partners;
}
/**
* Add attribute to client
*
* @param ClientAttribute $attribute Attribute
*
* @return void
*
* @since 1.0.0
*/
public function addAttribute(ClientAttribute $attribute) : void
{
$this->attributes[] = $attribute;
}
/**
* Get attributes
*
* @return ClientAttribute[]
*
* @since 1.0.0
*/
public function getAttributes() : array
{
return $this->attributes;
}
/**
* Get contacts.
*

View File

@ -257,6 +257,25 @@ $CONFIG = [
'root' => '/',
'https' => false,
],
'app' => [
'path' => __DIR__,
'default' => [
'app' => 'Backend',
'id' => 'backend',
'lang' => 'en',
'theme' => 'Backend',
'org' => 1,
],
'domains' => [
'127.0.0.1' => [
'app' => 'Backend',
'id' => 'backend',
'lang' => 'en',
'theme' => 'Backend',
'org' => 1,
],
],
],
'socket' => [
'master' => [
'host' => '127.0.0.1',