Le module MondialRelay n'était pas commité
This commit is contained in:
269
local/modules/MondialRelay/Config/config-data.json
Normal file
269
local/modules/MondialRelay/Config/config-data.json
Normal file
@@ -0,0 +1,269 @@
|
||||
{
|
||||
"shippingZones": [
|
||||
{
|
||||
"name": "Mondial Relay - Relay delivery Zone 1",
|
||||
"delivery_time_in_days": 3,
|
||||
"delivery_type": 1,
|
||||
"countries": [
|
||||
"FRA",
|
||||
"BEL",
|
||||
"LUX",
|
||||
"MCO"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 0.5,
|
||||
"price_euro": 4.55
|
||||
},
|
||||
{
|
||||
"up_to": 1,
|
||||
"price_euro": 5.25
|
||||
},
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 5.95
|
||||
},
|
||||
{
|
||||
"up_to": 3,
|
||||
"price_euro": 6.80
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 8
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 10.50
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 12.75
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 15.35
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 19.10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mondial Relay - Relay delivery Zone 2",
|
||||
"delivery_time_in_days": 5,
|
||||
"delivery_type": 1,
|
||||
"countries": [
|
||||
"ESP"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 0.5,
|
||||
"price_euro": 8.40
|
||||
},
|
||||
{
|
||||
"up_to": 1,
|
||||
"price_euro": 9
|
||||
},
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 9.80
|
||||
},
|
||||
{
|
||||
"up_to": 3,
|
||||
"price_euro": 10.50
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 12.80
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 15.20
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 17.40
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 22.80
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 27.50
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mondial Relay - Home delivery Zone 1",
|
||||
"delivery_time_in_days": 3,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"DEU",
|
||||
"BEL",
|
||||
"LUX"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 0.5,
|
||||
"price_euro": 9.50
|
||||
},
|
||||
{
|
||||
"up_to": 1,
|
||||
"price_euro": 9.50
|
||||
},
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 10.20
|
||||
},
|
||||
{
|
||||
"up_to": 3,
|
||||
"price_euro": 10.90
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 12.30
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 13.70
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 15.80
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 19.30
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 29.80
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mondial Relay - Home delivery Zone 2",
|
||||
"delivery_time_in_days": 5,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"GBR",
|
||||
"ESP"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 0.5,
|
||||
"price_euro": 10.20
|
||||
},
|
||||
{
|
||||
"up_to": 1,
|
||||
"price_euro": 10.20
|
||||
},
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 11.30
|
||||
},
|
||||
{
|
||||
"up_to": 3,
|
||||
"price_euro": 12.40
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 14.60
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 16.80
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 20.10
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 25.60
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 36.60
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mondial Relay - Home delivery Zone 3",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"ITA",
|
||||
"PRT",
|
||||
"AUT"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 0.5,
|
||||
"price_euro": 11.20
|
||||
},
|
||||
{
|
||||
"up_to": 1,
|
||||
"price_euro": 11.20
|
||||
},
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 12.30
|
||||
},
|
||||
{
|
||||
"up_to": 3,
|
||||
"price_euro": 13.40
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 15.60
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 17.80
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 21.10
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 26.60
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 37.60
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"insurances": [
|
||||
{
|
||||
"level": 1,
|
||||
"value": 50,
|
||||
"price_with_tax_euro": 2
|
||||
},
|
||||
{
|
||||
"level": 2,
|
||||
"value": 125,
|
||||
"price_with_tax_euro": 3.50
|
||||
},
|
||||
{
|
||||
"level": 3,
|
||||
"value": 250,
|
||||
"price_with_tax_euro": 5
|
||||
},
|
||||
{
|
||||
"level": 4,
|
||||
"value": 375,
|
||||
"price_with_tax_euro": 6.50
|
||||
},
|
||||
{
|
||||
"level": 5,
|
||||
"value": 500,
|
||||
"price_with_tax_euro": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
76
local/modules/MondialRelay/Config/config.xml
Normal file
76
local/modules/MondialRelay/Config/config.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<loops>
|
||||
<loop name="mondialrelay.prices" class="MondialRelay\Loop\Prices" />
|
||||
<loop name="mondialrelay.area-attributes" class="MondialRelay\Loop\AreaAttributes" />
|
||||
<loop name="mondialrelay.insurances" class="MondialRelay\Loop\Insurances" />
|
||||
|
||||
<loop name="mondialrelay.delivery-price" class="MondialRelay\Loop\DeliveryPrice" />
|
||||
<loop name="mondialrelay.pickup-points" class="MondialRelay\Loop\PickupPoints" />
|
||||
<loop name="mondialrelay.selected-pickup-point" class="MondialRelay\Loop\SelectedPickupPoint" />
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<form name="mondialrelay.settings_form" class="MondialRelay\Form\SettingsForm" />
|
||||
|
||||
<form name="mondialrelay.area_attributes_update_form" class="MondialRelay\Form\PriceAttributesUpdateForm" />
|
||||
|
||||
<form name="mondialrelay.price_form" class="MondialRelay\Form\PriceCreateForm" />
|
||||
<form name="mondialrelay.prices_update_form" class="MondialRelay\Form\PricesUpdateForm" />
|
||||
|
||||
<form name="mondialrelay.insurances_update_form" class="MondialRelay\Form\InsurancesUpdateForm" />
|
||||
<form name="mondialrelay.insurance_create_form" class="MondialRelay\Form\InsuranceCreateForm" />
|
||||
</forms>
|
||||
|
||||
<services>
|
||||
<service id="mondialrelay.delivery.service" class="MondialRelay\EventListeners\DeliveryListener">
|
||||
<argument type="service" id="request_stack" />
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
<service id="mondialrelay.mailing.service" class="MondialRelay\EventListeners\SendDeliveryEmail">
|
||||
<argument type="service" id="mailer" />
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
|
||||
</services>
|
||||
|
||||
<hooks>
|
||||
<hook id="mondialrelay.admin.hookmanager" class="MondialRelay\Hook\AdminHookManager">
|
||||
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfigure" />
|
||||
<tag name="hook.event_listener" event="module.config-js" type="back" method="onModuleConfigureJs" />
|
||||
<tag name="hook.event_listener" event="main.top-menu-tools" type="back" method="onMainTopMenuTools" />
|
||||
</hook>
|
||||
|
||||
<hook id="mondialrelay.front.hookmanager" class="MondialRelay\Hook\FrontHookManager">
|
||||
<tag name="hook.event_listener" event="order-delivery.extra" type="front" method="onOrderDeliveryExtra" />
|
||||
<tag name="hook.event_listener" event="order-delivery.stylesheet" type="front" templates="css:mondialrelay/assets/css/styles.css" />
|
||||
<tag name="hook.event_listener" event="order-invoice.delivery-address" type="front" templates="render:mondialrelay/delivery-address.html"/>
|
||||
<tag name="hook.event_listener" event="account-order.delivery-address" type="front" method="onAccountOrderDeliveryAddress"/>
|
||||
</hook>
|
||||
|
||||
<hook id="mondialrelay.email.hookmanager" class="MondialRelay\Hook\EmailHookManager">
|
||||
<tag name="hook.event_listener" event="email-html.order-confirmation.delivery-address" type="email" method="onDeliveryAddressHtml"/>
|
||||
<tag name="hook.event_listener" event="email-txt.order-confirmation.delivery-address" type="email" method="onDeliveryAddressText"/>
|
||||
<tag name="hook.event_listener" event="email-html.order-notification.delivery-address" type="email" method="onDeliveryAddressHtml"/>
|
||||
<tag name="hook.event_listener" event="email-txt.order-notification.delivery-address" type="email" method="onDeliveryAddressText"/>
|
||||
|
||||
<tag name="hook.event_listener" event="email-html.order-confirmation.after-products" type="email" method="onAfterProductsHtml"/>
|
||||
<tag name="hook.event_listener" event="email-txt.order-confirmation.after-products" type="email" method="onAfterProductsText"/>
|
||||
<tag name="hook.event_listener" event="email-html.order-notification.after-products" type="email" method="onAfterProductsHtml"/>
|
||||
<tag name="hook.event_listener" event="email-txt.order-notification.after-products" type="email" method="onAfterProductsText"/>
|
||||
</hook>
|
||||
|
||||
<hook id="mondialrelay.pdf.hookmanager" class="MondialRelay\Hook\PdfHookManager">
|
||||
<tag name="hook.event_listener" event="delivery.delivery-address" type="pdf" method="onDeliveryAddress"/>
|
||||
<tag name="hook.event_listener" event="invoice.delivery-address" type="pdf" method="onDeliveryAddress"/>
|
||||
|
||||
<tag name="hook.event_listener" event="delivery.after-delivery-module" type="pdf" method="onAfterDeliveryModule"/>
|
||||
<tag name="hook.event_listener" event="invoice.after-delivery-module" type="pdf" method="onAfterDeliveryModule"/>
|
||||
|
||||
</hook>
|
||||
</hooks>
|
||||
</config>
|
||||
8
local/modules/MondialRelay/Config/drop.sql
Normal file
8
local/modules/MondialRelay/Config/drop.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
DROP TABLE IF EXISTS `mondial_relay_pickup_address`;
|
||||
DROP TABLE IF EXISTS `mondial_relay_delivery_price`;
|
||||
DROP TABLE IF EXISTS `mondial_relay_delivery_insurance`;
|
||||
DROP TABLE IF EXISTS `mondial_relay_zone_configuration`;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
26
local/modules/MondialRelay/Config/module.xml
Normal file
26
local/modules/MondialRelay/Config/module.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module xmlns="http://thelia.net/schema/dic/module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_1.xsd">
|
||||
<fullnamespace>MondialRelay\MondialRelay</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Mondial Relay delivery</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Livraison avec Mondial Relay</title>
|
||||
</descriptive>
|
||||
<languages>
|
||||
<language>en_US</language>
|
||||
<language>fr_FR</language>
|
||||
</languages>
|
||||
<version>1.0.7</version>
|
||||
<author>
|
||||
<name>Franck Allimant</name>
|
||||
<company>CQFDev</company>
|
||||
<email>thelia@cqfdev.fr</email>
|
||||
<website>www.cqfdev.fr</website>
|
||||
</author>
|
||||
<type>delivery</type>
|
||||
<thelia>2.3.0</thelia>
|
||||
<stability>prod</stability>
|
||||
</module>
|
||||
64
local/modules/MondialRelay/Config/routing.xml
Normal file
64
local/modules/MondialRelay/Config/routing.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
|
||||
<!-- Settings management -->
|
||||
|
||||
<route id="mondial_relay.settings.save" path="/admin/module/MondialRelay/settings/save">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\ConfigurationController::saveAction</default>
|
||||
</route>
|
||||
|
||||
|
||||
<!-- Area attributes management -->
|
||||
|
||||
<route id="mondial_relay.area-attributes.save" path="/admin/module/MondialRelay/area-attributes/save/{areaId}/{moduleId}">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\AreaAttributesController::saveAction</default>
|
||||
<requirement key="areaId">\d+</requirement>
|
||||
<requirement key="moduleId">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- Prices management -->
|
||||
|
||||
<route id="mondial_relay.price.save" path="/admin/module/MondialRelay/prices/save/{areaId}/{moduleId}">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\PriceController::saveAction</default>
|
||||
<requirement key="areaId">\d+</requirement>
|
||||
<requirement key="moduleId">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<route id="mondial_relay.price.create" path="/admin/module/MondialRelay/prices/create/{areaId}/{moduleId}">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\PriceController::createAction</default>
|
||||
<requirement key="areaId">\d+</requirement>
|
||||
<requirement key="moduleId">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<route id="mondial_relay.price.delete" path="/admin/module/MondialRelay/prices/delete/{priceId}/{moduleId}">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\PriceController::deleteAction</default>
|
||||
<requirement key="priceId">\d+</requirement>
|
||||
<requirement key="moduleId">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- Insurances management -->
|
||||
|
||||
<route id="mondial_relay.insurance.save" path="/admin/module/MondialRelay/insurances/save">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\InsuranceController::saveAction</default>
|
||||
</route>
|
||||
|
||||
<route id="mondial_relay.insurance.create" path="/admin/module/MondialRelay/insurances/create">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\InsuranceController::createAction</default>
|
||||
</route>
|
||||
|
||||
<route id="mondial_relay.insurance.delete" path="/admin/module/MondialRelay/insurances/delete/{insuranceId}">
|
||||
<default key="_controller">MondialRelay\Controller\BackOffice\InsuranceController::deleteAction</default>
|
||||
<requirement key="insuranceId">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- Front routes -->
|
||||
|
||||
<route id="mondial_relay.relay_map" path="MondialRelay/relay-map">
|
||||
<default key="_controller">MondialRelay\Controller\FrontOffice\MapManagement::getRelayMapAction</default>
|
||||
</route>
|
||||
|
||||
</routes>
|
||||
42
local/modules/MondialRelay/Config/schema.xml
Normal file
42
local/modules/MondialRelay/Config/schema.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="thelia"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../core/vendor/propel/propel/resources/xsd/database.xsd" >
|
||||
|
||||
<table name="mondial_relay_pickup_address" namespace="MondialRelay\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" autoIncrement="true" />
|
||||
<column name="json_relay_data" required="true" type="CLOB"/>
|
||||
<column name="order_address_id" required="true" type="INTEGER"/>
|
||||
</table>
|
||||
|
||||
<table name="mondial_relay_delivery_price" namespace="MondialRelay\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" autoIncrement="true" />
|
||||
<column name="max_weight" defaultValue="0.000000" required="true" scale="6" size="16" type="DECIMAL" />
|
||||
<column name="price_with_tax" defaultValue="0.000000" required="true" scale="6" size="16" type="DECIMAL" />
|
||||
<column name="area_id" required="true" type="INTEGER" />
|
||||
|
||||
<foreign-key foreignTable="area" name="fk_mondial_relay_delivery_price_area_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="area_id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<table name="mondial_relay_delivery_insurance" namespace="MondialRelay\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" autoIncrement="true" />
|
||||
<column name="level" required="true" type="INTEGER" />
|
||||
<column name="max_value" defaultValue="0.000000" required="true" scale="6" size="16" type="DECIMAL" />
|
||||
<column name="price_with_tax" defaultValue="0.000000" required="true" scale="6" size="16" type="DECIMAL" />
|
||||
</table>
|
||||
|
||||
<table name="mondial_relay_zone_configuration" namespace="MondialRelay\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" autoIncrement="true" />
|
||||
<column name="delivery_time" required="true" type="INTEGER" />
|
||||
<column name="delivery_type" required="true" type="INTEGER" size="1" />
|
||||
<column name="area_id" required="true" type="INTEGER" />
|
||||
|
||||
<foreign-key foreignTable="area" name="fk_mondial_relay_zone_configuration_area_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="area_id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
|
||||
</database>
|
||||
78
local/modules/MondialRelay/Config/thelia.sql
Normal file
78
local/modules/MondialRelay/Config/thelia.sql
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- mondial_relay_pickup_address
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `mondial_relay_pickup_address`;
|
||||
|
||||
CREATE TABLE `mondial_relay_pickup_address`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`json_relay_data` LONGTEXT NOT NULL,
|
||||
`order_address_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- mondial_relay_delivery_price
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `mondial_relay_delivery_price`;
|
||||
|
||||
CREATE TABLE `mondial_relay_delivery_price`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`max_weight` DECIMAL(16,6) DEFAULT 0.000000 NOT NULL,
|
||||
`price_with_tax` DECIMAL(16,6) DEFAULT 0.000000 NOT NULL,
|
||||
`area_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fi_mondial_relay_delivery_price_area_id` (`area_id`),
|
||||
CONSTRAINT `fk_mondial_relay_delivery_price_area_id`
|
||||
FOREIGN KEY (`area_id`)
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- mondial_relay_delivery_insurance
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `mondial_relay_delivery_insurance`;
|
||||
|
||||
CREATE TABLE `mondial_relay_delivery_insurance`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`level` INTEGER NOT NULL,
|
||||
`max_value` DECIMAL(16,6) DEFAULT 0.000000 NOT NULL,
|
||||
`price_with_tax` DECIMAL(16,6) DEFAULT 0.000000 NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- mondial_relay_zone_configuration
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `mondial_relay_zone_configuration`;
|
||||
|
||||
CREATE TABLE `mondial_relay_zone_configuration`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`delivery_time` INTEGER NOT NULL,
|
||||
`delivery_type` INTEGER(1) NOT NULL,
|
||||
`area_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fi_mondial_relay_zone_configuration_area_id` (`area_id`),
|
||||
CONSTRAINT `fk_mondial_relay_zone_configuration_area_id`
|
||||
FOREIGN KEY (`area_id`)
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user