-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- В EntityManagerFactory.php поменял на создание через xml - В Makefile добавил отдельное создание и удаление бд. - Для тестирования добавил тестовую сущность
- Loading branch information
1 parent
22baa6e
commit a29c2e6
Showing
6 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
<entity name="Bitrix24\SDK\Lib\Bitrix24Accounts\Entity\Bitrix24Account" table="bitrix24account"> | ||
<id name="id" type="uuid" column="id"> | ||
<generator strategy="UUID"/> | ||
</id> | ||
|
||
<field name="bitrix24UserId" type="integer" column="b24_user_id" nullable="false"/> | ||
<field name="isBitrix24UserAdmin" type="boolean" column="is_b24_user_admin" nullable="false"/> | ||
|
||
<field name="memberId" type="string" column="member_id" nullable="false"/> | ||
|
||
<field name="domainUrl" type="string" column="domain_url" nullable="false"/> | ||
|
||
<field name="accountStatus" type="string" column="account_status" nullable="false" enumType="Bitrix24\SDK\Application\Contracts\Bitrix24Accounts\Entity\Bitrix24AccountStatus"/> | ||
|
||
<embedded name="authToken" class="Bitrix24\SDK\Core\Credentials\AuthToken"/> | ||
|
||
<field name="createdAt" type="datetime_immutable" column="created_at_utc" precision="3" nullable="false"/> | ||
|
||
<field name="updatedAt" type="datetime_immutable" column="update_at_utc" precision="3" nullable="false"/> | ||
|
||
<field name="applicationVersion" type="integer" column="application_version" nullable="false"/> | ||
|
||
<!-- Вложенный объект Scope --> | ||
<embedded name="applicationScope" class="Bitrix24\SDK\Core\Credentials\Scope"/> | ||
</entity> | ||
|
||
<embeddable name="Bitrix24\SDK\Core\Credentials\AuthToken"> | ||
<field name="accessToken" type="string" column="access_token"/> | ||
<field name="refreshToken" type="string" column="refresh_token"/> | ||
<field name="expires" type="integer" column="expires"/> | ||
<field name="expiresIn" type="integer" column="expires_in"/> | ||
</embeddable> | ||
|
||
<embeddable name="Bitrix24\SDK\Core\Credentials\Scope"> | ||
<field name="availableScope" type="array" column="available_scope"/> | ||
<field name="currentScope" type="array" column="current_scope"/> | ||
</embeddable> | ||
</doctrine-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
<entity name="Bitrix24\SDK\Lib\Bitrix24Accounts\Entity\TestUser" table="test_user"> | ||
<id name="id" type="id" column="id"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="login" type="string" nullable="false"/> | ||
<field name="password" type="string" nullable="false"/> | ||
</entity> | ||
</doctrine-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Lib\Bitrix24Accounts\Entity; | ||
|
||
class TestUser | ||
{ | ||
private int $id; | ||
|
||
private string $login; | ||
|
||
private string $password; | ||
|
||
public function getLogin(): string | ||
{ | ||
return $this->login; | ||
} | ||
|
||
public function setLogin(string $login): void | ||
{ | ||
$this->login = $login; | ||
} | ||
|
||
public function getPassword(): string | ||
{ | ||
return $this->password; | ||
} | ||
|
||
public function setPassword(string $password): void | ||
{ | ||
$this->password = $password; | ||
} | ||
public function getId(): int | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function setId(int $id): void | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters