-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRecord.orm.xml
More file actions
36 lines (35 loc) · 1.99 KB
/
Record.orm.xml
File metadata and controls
36 lines (35 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<doctrine-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
<entity name="BugCatcher\Entity\Record"
table="record" inheritance-type="JOINED"
repository-class="BugCatcher\Repository\RecordRepository"
>
<indexes>
<index name="full_idx" columns="project_id,date,status"/>
<index name="date_idx" columns="status,date"/>
<index name="done_idx" columns="project_id,status"/>
<index name="hash_idx" columns="hash,status,date"/>
<index name="code_idx" columns="status,code,date"/>
</indexes>
<discriminator-column name="discr" type="string"/>
<discriminator-map>
<discriminator-mapping value="log" class="BugCatcher\Entity\RecordLog"/>
<discriminator-mapping value="trace-log" class="BugCatcher\Entity\RecordLogTrace"/>
<discriminator-mapping value="ping" class="BugCatcher\Entity\RecordPing"/>
</discriminator-map>
<id name="id" type="uuid" column="id">
<generator strategy="CUSTOM"/>
<custom-id-generator class="Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator"/>
</id>
<field name="date" type="datetime_immutable" nullable="false"/>
<field name="status" type="string" length="50"/>
<field name="hash" type="string" length="32" nullable="true"/>
<field name="code" type="string" length="15" nullable="true"/>
<field name="metadata" type="simple_array" nullable="true"/>
<many-to-one field="project" target-entity="BugCatcher\Entity\Project">
<join-column name="project_id" referenced-column-name="id" on-delete="CASCADE" nullable="false"/>
</many-to-one>
</entity>
</doctrine-mapping>