Initial commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
||||
xmlns:xsi="http://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="App\FeedManagement\Domain\Model\Entity\Bookmark"
|
||||
repository-class="App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM\BookmarkOrmRepository"
|
||||
table="bookmark"
|
||||
>
|
||||
<id name="id" type="bookmark_id">
|
||||
<generator strategy="NONE"/>
|
||||
</id>
|
||||
|
||||
<!-- fetching eager cause will always need to check the user's id whenever we deal with a bookmark -->
|
||||
<many-to-one field="user" target-entity="App\IdentityAndAccess\Domain\Model\Entity\User" fetch="EAGER">
|
||||
<join-column nullable="false" on-delete="CASCADE" />
|
||||
</many-to-one>
|
||||
|
||||
<field name="name" length="255" />
|
||||
<field name="description" length="512" nullable="true" />
|
||||
<field name="isPublic" type="boolean">
|
||||
<options>
|
||||
<option name="default">0</option>
|
||||
</options>
|
||||
</field>
|
||||
|
||||
<many-to-many field="articles" target-entity="App\Aggregator\Domain\Model\Entity\Article">
|
||||
<join-table name="bookmark_article">
|
||||
<join-columns>
|
||||
<join-column name="bookmark_id" referenced-column-name="id" on-delete="CASCADE" />
|
||||
</join-columns>
|
||||
<inverse-join-columns>
|
||||
<join-column name="article_id" referenced-column-name="id" on-delete="CASCADE" />
|
||||
</inverse-join-columns>
|
||||
</join-table>
|
||||
</many-to-many>
|
||||
|
||||
<field name="createdAt" type="datetime_immutable"/>
|
||||
<field name="updatedAt" type="datetime_immutable" nullable="true"/>
|
||||
</entity>
|
||||
</doctrine-mapping>
|
||||
Reference in New Issue
Block a user