forked from cleverage/processuibundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#37 Refactor models to allow overriding:
- replace php annotated entities by xml mapping/validations. Add Interfaces. - add class entries on configuration for models - rework install documentation with a Doctrine ORM Configuration chapter - rework repositories and other services using model classNames & Interfaces
- Loading branch information
1 parent
e575297
commit 2f13e7e
Showing
39 changed files
with
714 additions
and
270 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"> | ||
<mapped-superclass name="CleverAge\UiProcessBundle\Entity\LogRecord"> | ||
<indexes> | ||
<index name="idx_log_record_level" columns="level" /> | ||
<index name="idx_log_record_created_at" columns="created_at" /> | ||
</indexes> | ||
|
||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO" /> | ||
</id> | ||
<field name="channel" type="string" length="64" /> | ||
<field name="level" type="integer" /> | ||
<field name="message" type="string" length="512" /> | ||
<field name="context" type="json" /> | ||
<field name="createdAt" type="datetime_immutable" /> | ||
<many-to-one field="processExecution" target-entity="CleverAge\UiProcessBundle\Entity\ProcessExecutionInterface"> | ||
<join-column name="process_execution_id" referenced-column-name="id" on-delete="CASCADE" nullable="false" /> | ||
</many-to-one> | ||
</mapped-superclass> | ||
</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,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"> | ||
<mapped-superclass name="CleverAge\UiProcessBundle\Entity\ProcessExecution"> | ||
<indexes> | ||
<index name="idx_process_execution_code" columns="code" /> | ||
<index name="idx_process_execution_start_date" columns="start_date" /> | ||
</indexes> | ||
|
||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO" /> | ||
</id> | ||
<field name="code" type="string" length="255" /> | ||
<field name="startDate" type="datetime_immutable"/> | ||
<field name="endDate" type="datetime_immutable" nullable="true" /> | ||
<field name="status" type="string" enum-type="CleverAge\UiProcessBundle\Entity\Enum\ProcessExecutionStatus" /> | ||
<field name="report" type="json" /> | ||
<field name="context" type="json" nullable="true" /> | ||
<field name="logFilename" type="string" length="255" /> | ||
</mapped-superclass> | ||
</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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"> | ||
<mapped-superclass name="CleverAge\UiProcessBundle\Entity\ProcessSchedule"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO" /> | ||
</id> | ||
<field name="process" type="string" length="255" /> | ||
<field name="type" type="string" length="6" enum-type="CleverAge\UiProcessBundle\Entity\Enum\ProcessScheduleType" /> | ||
<field name="expression" type="string" length="255" /> | ||
<field name="input" type="text" nullable="true" /> | ||
<field name="context" type="json" /> | ||
</mapped-superclass> | ||
</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,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"> | ||
<mapped-superclass name="CleverAge\UiProcessBundle\Entity\User" table="process_user"> | ||
<indexes> | ||
<index name="idx_process_user_email" columns="email" /> | ||
</indexes> | ||
|
||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO" /> | ||
</id> | ||
<field name="email" type="string" length="255" unique="true" /> | ||
<field name="firstname" type="string" length="255" nullable="true" /> | ||
<field name="lastname" type="string" length="255" nullable="true" /> | ||
<field name="roles" type="json" /> | ||
<field name="password" type="string" length="255" nullable="true" /> | ||
<field name="timezone" type="string" length="255" nullable="true" /> | ||
<field name="locale" type="string" length="255" nullable="true" /> | ||
<field name="token" type="string" length="255" nullable="true" /> | ||
</mapped-superclass> | ||
</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
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
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"> | ||
<class name="CleverAge\UiProcessBundle\Entity\ProcessSchedule"> | ||
<property name="process"> | ||
<constraint name="CleverAge\UiProcessBundle\Validator\IsValidProcessCode" /> | ||
</property> | ||
<property name="expression"> | ||
<constraint name="When"> | ||
<option name="expression">this.getType().value == "cron"</option> | ||
<option name="constraints"> | ||
<constraint name="CleverAge\UiProcessBundle\Validator\CronExpression" /> | ||
</option> | ||
</constraint> | ||
<constraint name="When"> | ||
<option name="expression">this.getType().value == "every"</option> | ||
<option name="constraints"> | ||
<constraint name="CleverAge\UiProcessBundle\Validator\EveryExpression" /> | ||
</option> | ||
</constraint> | ||
</property> | ||
</class> | ||
</constraint-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
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
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
Oops, something went wrong.