Skip to content

Commit

Permalink
Normalize doctrine fields mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
diimpp committed Mar 6, 2020
1 parent 2f2c64f commit 56bf2c6
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
10 changes: 5 additions & 5 deletions src/Resources/config/doctrine/CreditMemo.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<mapped-superclass name="Sylius\RefundPlugin\Entity\CreditMemo" table="sylius_refund_credit_memo">
<id name="id" column="id" type="string" />

<field name="number" />
<field name="total" type="integer" />
<field name="currencyCode" column="currency_code" />
<field name="localeCode" column="locale_code" />
<field name="comment" type="text" />
<field name="number" column="number" type="string" />
<field name="total" column="total" type="integer" />
<field name="currencyCode" column="currency_code" type="string" />
<field name="localeCode" column="locale_code" type="string" />
<field name="comment" column="comment" type="text" />
<field name="issuedAt" column="issued_at" type="datetime" nullable="true" />

<many-to-one field="channel" target-entity="Sylius\Component\Core\Model\ChannelInterface">
Expand Down
3 changes: 2 additions & 1 deletion src/Resources/config/doctrine/CreditMemoSequence.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>

<field name="index" column="idx" type="integer" />
<field name="version" type="integer" version="true" />
<field name="version" column="version" type="integer" version="true" />
</entity>
</doctrine-mapping>
16 changes: 8 additions & 8 deletions src/Resources/config/doctrine/CustomerBillingData.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<generator strategy="AUTO" />
</id>

<field name="customerName" column="customer_name"/>
<field name="street" />
<field name="postcode" />
<field name="countryCode" column="country_code"/>
<field name="city" />
<field name="company" nullable="true" />
<field name="provinceName" column="province_name" nullable="true" />
<field name="provinceCode" column="province_code" nullable="true" />
<field name="customerName" column="customer_name" type="string" />
<field name="street" column="street" type="string" />
<field name="postcode" column="postcode" type="string" />
<field name="countryCode" column="country_code" type="string" />
<field name="city" column="city" type="string" />
<field name="company" column="company" type="string" nullable="true" />
<field name="provinceName" column="province_name" type="string" nullable="true" />
<field name="provinceCode" column="province_code" type="string" nullable="true" />
</entity>
</doctrine-mapping>
8 changes: 4 additions & 4 deletions src/Resources/config/doctrine/LineItem.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<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 http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<mapped-superclass name="Sylius\RefundPlugin\Entity\LineItem" table="sylius_refund_line_item">
<id name="id" column="id" type="integer">
<generator />
<generator strategy="AUTO" />
</id>

<field name="name" />
<field name="quantity" type="integer" />
<field name="name" column="name" type="string" />
<field name="quantity" column="quantity" type="integer" />
<field name="unitNetPrice" column="unit_net_price" type="integer" />
<field name="unitGrossPrice" column="unit_gross_price" type="integer" />
<field name="netValue" column="net_value" type="integer" />
<field name="grossValue" column="gross_value" type="integer" />
<field name="taxAmount" column="tax_amount" type="integer" />
<field name="taxRate" column="tax_rate" nullable="true" />
<field name="taxRate" column="tax_rate" type="string" nullable="true" />
</mapped-superclass>
</doctrine-mapping>
8 changes: 4 additions & 4 deletions src/Resources/config/doctrine/Refund.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<generator strategy="AUTO" />
</id>

<field name="orderNumber" column="order_number" />
<field name="amount" type="integer" />
<field name="refundedUnitId" type="integer" nullable="true" column="refunded_unit_id"/>
<field name="type" type="sylius_refund_refund_type" />
<field name="orderNumber" column="order_number" type="string" />
<field name="amount" column="amount" type="integer" />
<field name="refundedUnitId" column="refunded_unit_id" type="integer" nullable="true" />
<field name="type" column="type" type="sylius_refund_refund_type" />
</mapped-superclass>
</doctrine-mapping>
8 changes: 4 additions & 4 deletions src/Resources/config/doctrine/RefundPayment.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<generator strategy="AUTO" />
</id>

<field name="orderNumber" column="order_number"/>
<field name="amount" type="integer" />
<field name="currencyCode" column="currency_code"/>
<field name="state" />
<field name="orderNumber" column="order_number" type="string" />
<field name="amount" column="amount" type="integer" />
<field name="currencyCode" column="currency_code" type="string" />
<field name="state" column="state" type="string" />

<many-to-one field="paymentMethod" target-entity="Sylius\Component\Payment\Model\PaymentMethodInterface">
<join-column name="payment_method_id" referenced-column-name="id" nullable="true" />
Expand Down
12 changes: 6 additions & 6 deletions src/Resources/config/doctrine/ShopBillingData.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<generator strategy="AUTO" />
</id>

<field name="company" nullable="true" />
<field name="taxId" column="tax_id" nullable="true" />
<field name="countryCode" column="country_code" nullable="true" />
<field name="street" nullable="true" />
<field name="city" nullable="true" />
<field name="postcode" nullable="true" />
<field name="company" column="company" type="string" nullable="true" />
<field name="taxId" column="tax_id" type="string" nullable="true" />
<field name="countryCode" column="country_code" type="string" nullable="true" />
<field name="street" column="street" type="string" nullable="true" />
<field name="city" column="city" type="string" nullable="true" />
<field name="postcode" column="postcode" type="string" nullable="true" />
</entity>
</doctrine-mapping>
6 changes: 3 additions & 3 deletions src/Resources/config/doctrine/TaxItem.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
>
<mapped-superclass name="Sylius\RefundPlugin\Entity\TaxItem" table="sylius_refund_tax_item">
<id name="id" column="id" type="integer">
<generator />
<generator strategy="AUTO" />
</id>

<field name="label" />
<field name="amount" type="integer" />
<field name="label" column="label" type="string" />
<field name="amount" column="amount" type="integer" />
</mapped-superclass>
</doctrine-mapping>

0 comments on commit 56bf2c6

Please sign in to comment.