1
0
Fork 0
mirror of synced 2025-04-11 21:10:54 +00:00

Compare commits

...

10 commits

Author SHA1 Message Date
9927490844
Merge pull request #55 from Chupocabra/add-dialogs-utm
Utm information in dialog
2025-04-11 16:58:50 +03:00
Alex Komarichev
22e4bf9cac Utm information in dialog 2025-04-11 16:19:28 +03:00
7a87f2669b
Merge pull request #54 from Chupocabra/refactor-members_req
Use CommonFields in MembersRequest
2025-03-26 11:42:56 +03:00
Alex Komarichev
f65dcac9f5 ignore phpstan setID type error 2025-03-26 11:33:11 +03:00
Alex Komarichev
9a23562cbd Use CommonFields in MembersRequest 2025-03-26 11:14:48 +03:00
141c2c9bc3
update actions version in ci 2025-03-26 11:09:50 +03:00
46e0f84265
Merge pull request #53 from kifril-ltd/role-hidden
Add new bot role `hidden`
2024-11-15 14:40:13 +03:00
Kirill Sukhorukov
dc0ead717e Add new bot role hidden 2024-11-14 15:46:02 +03:00
2d5a8ceaed
Added is_system to User 2024-11-05 12:42:01 +03:00
Alex Komarichev
2b798fa877 Added is_system to User 2024-11-05 12:28:27 +03:00
6 changed files with 60 additions and 52 deletions

View file

@ -15,14 +15,14 @@ jobs:
matrix: matrix:
php-version: ['7.3', '7.4', '8.0', '8.1'] php-version: ['7.3', '7.4', '8.0', '8.1']
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php-version }} - name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-version }} php-version: ${{ matrix.php-version }}
tools: composer:v1 tools: composer:v1
- name: Composer cache - name: Composer cache
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: ${{ env.HOME }}/.composer/cache path: ${{ env.HOME }}/.composer/cache
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}

View file

@ -1355,6 +1355,11 @@ parameters:
count: 1 count: 1
path: src/Bot/Model/Request/MembersRequest.php path: src/Bot/Model/Request/MembersRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setId\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Bot/Model/Request/MembersRequest.php
- -
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setSince\\(\\) has no return typehint specified\\.$#" message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setSince\\(\\) has no return typehint specified\\.$#"
count: 1 count: 1

View file

@ -38,6 +38,7 @@ class Constants
const BOT_ROLE_DISTRIBUTOR = "distributor"; const BOT_ROLE_DISTRIBUTOR = "distributor";
const BOT_ROLE_RESPONSIBLE = "responsible"; const BOT_ROLE_RESPONSIBLE = "responsible";
const BOT_ROLE_HIDDEN = "hidden";
const MESSAGE_SCOPE_PUBLIC = "public"; const MESSAGE_SCOPE_PUBLIC = "public";
const MESSAGE_SCOPE_PRIVATE = "private"; const MESSAGE_SCOPE_PRIVATE = "private";

View file

@ -119,6 +119,15 @@ class Dialog implements ModelInterface
*/ */
private $isActive; private $isActive;
/**
* @var Utm $utm
*
* @Type("RetailCrm\Mg\Bot\Model\Entity\Utm")
* @Accessor(getter="getUtm",setter="setUtm")
* @SkipWhenEmpty()
*/
private $utm;
/** /**
* @return string|null * @return string|null
*/ */
@ -294,4 +303,21 @@ class Dialog implements ModelInterface
{ {
$this->isActive = $isActive; $this->isActive = $isActive;
} }
/**
* @return Utm|null
*/
public function getUtm(): ?Utm
{
return $this->utm;
}
/**
* @param Utm $utm
* @return void
*/
public function setUtm(Utm $utm): void
{
$this->utm = $utm;
}
} }

View file

@ -142,6 +142,15 @@ class User implements ModelInterface
*/ */
private $revokedAt; private $revokedAt;
/**
* @var bool $isSystem
*
* @Type("bool")
* @Accessor(getter="isSystem",setter="setIsSystem")
* @SkipWhenEmpty()
*/
private $isSystem;
/** /**
* @return string|null * @return string|null
*/ */
@ -349,4 +358,20 @@ class User implements ModelInterface
{ {
$this->revokedAt = $revokedAt; $this->revokedAt = $revokedAt;
} }
/**
* @return bool|null
*/
public function isSystem(): ?bool
{
return $this->isSystem;
}
/**
* @param bool $isSystem
*/
public function setIsSystem(bool $isSystem): void
{
$this->isSystem = $isSystem;
}
} }

View file

@ -22,6 +22,7 @@ use RetailCrm\Mg\Bot\Model\ModelInterface;
*/ */
class MembersRequest implements ModelInterface class MembersRequest implements ModelInterface
{ {
use CommonFields;
use PageLimit; use PageLimit;
/** /**
@ -51,24 +52,6 @@ class MembersRequest implements ModelInterface
*/ */
private $state; private $state;
/**
* @var string $since
*
* @Type("string")
* @Accessor(getter="getSince",setter="setSince")
* @SkipWhenEmpty
*/
private $since;
/**
* @var string $until
*
* @Type("string")
* @Accessor(getter="getUntil",setter="setUntil")
* @SkipWhenEmpty
*/
private $until;
/** /**
* @return int * @return int
*/ */
@ -116,36 +99,4 @@ class MembersRequest implements ModelInterface
{ {
$this->state = $state; $this->state = $state;
} }
/**
* @return string
*/
public function getSince()
{
return $this->since;
}
/**
* @param string $since
*/
public function setSince(string $since)
{
$this->since = $since;
}
/**
* @return string
*/
public function getUntil()
{
return $this->until;
}
/**
* @param string $until
*/
public function setUntil(string $until)
{
$this->until = $until;
}
} }