Fewos in CRM,
Fewo Clients Bookings create / edit / delelte via API in DB
This commit is contained in:
parent
aebfb0586a
commit
c0c2a1822c
55 changed files with 9787 additions and 1486 deletions
|
|
@ -32,7 +32,6 @@ class CreateTravelAgendaTable extends Migration
|
|||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateTravelUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('travel_users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->bigInteger('salutation_id')->nullable();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->unique();
|
||||
|
||||
$table->string('password');
|
||||
|
||||
$table->string('company')->nullable();
|
||||
|
||||
$table->string('street')->nullable();
|
||||
$table->string('zipcode', 10)->nullable();
|
||||
$table->string('city')->nullable();
|
||||
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('mobil')->nullable();
|
||||
$table->string('fax')->nullable();
|
||||
|
||||
$table->date('birthday')->nullable();
|
||||
|
||||
$table->integer('travel_nationality_id');
|
||||
|
||||
$table->text('new_data')->nullable();
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('travel_nationality_id')
|
||||
->references('id')
|
||||
->on('travel_nationality');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('travel_users');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoLodgingTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_lodging', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('group_id')->nullable();
|
||||
$table->integer('type_id')->nullable();
|
||||
$table->string('name', 255);
|
||||
$table->longText('description');
|
||||
$table->longText('equipment');
|
||||
$table->string('adress1', 255);
|
||||
$table->string('adress2', 255)->nullable();
|
||||
$table->string('zip_code', 255);
|
||||
$table->string('city', 255);
|
||||
$table->integer('maximum_persons');
|
||||
$table->double('deposit');
|
||||
$table->tinyInteger('calendar_visible')->nullable();
|
||||
|
||||
$table->index('type_id', 'IDX_9629C357C54C8C93');
|
||||
$table->index('group_id', 'group_id');
|
||||
|
||||
$table->foreign('type_id', 'FK_9629C357C54C8C93')->references('id')->on('fewo_lodging_type')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('group_id', 'fewo_lodging_ibfk_1')->references('id')->on('fewo_lodging_group')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoLodgingGroupImageTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_lodging_group_image', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('group_id')->nullable();
|
||||
$table->string('comp', 4)->nullable();
|
||||
$table->smallInteger('pos')->nullable();
|
||||
$table->string('full_file_name', 255);
|
||||
$table->string('file_name', 255);
|
||||
$table->string('description', 255)->nullable();
|
||||
|
||||
$table->index('group_id', 'group_id');
|
||||
|
||||
$table->foreign('group_id', 'fewo_lodging_group_image_ibfk_1')->references('id')->on('fewo_lodging_group')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_group_image');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoLodgingGroupTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_lodging_group', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 255)->nullable();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_group');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoLodgingImageTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_lodging_image', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('lodging_id')->nullable();
|
||||
$table->unsignedSmallInteger('pos')->nullable();
|
||||
$table->string('full_file_name', 255);
|
||||
$table->string('file_name', 255);
|
||||
$table->string('description', 255)->nullable();
|
||||
|
||||
$table->index('lodging_id', 'IDX_D49F667187335AF1');
|
||||
|
||||
$table->foreign('lodging_id', 'FK_D49F667187335AF1')->references('id')->on('fewo_lodging')->onDelete('SET NULL
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_image');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoLodgingTypeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_lodging_type', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 255)->nullable();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_type');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoPriceTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_price', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('lodging_id')->nullable();
|
||||
$table->integer('season_id')->nullable();
|
||||
$table->double('per_night');
|
||||
$table->double('flat_price');
|
||||
|
||||
$table->index('lodging_id', 'IDX_3DE13C987335AF1');
|
||||
$table->index('season_id', 'IDX_3DE13C94EC001D1');
|
||||
|
||||
$table->foreign('season_id', 'FK_3DE13C94EC001D1')->references('id')->on('fewo_season')->onDelete('SET NULL
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('lodging_id', 'FK_3DE13C987335AF1')->references('id')->on('fewo_lodging')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_price');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoReservationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_reservation', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('lodging_id')->nullable();
|
||||
$table->date('from_date');
|
||||
$table->date('to_date');
|
||||
$table->integer('status');
|
||||
$table->integer('type')->nullable();
|
||||
|
||||
$table->index('lodging_id', 'IDX_36537F7487335AF1');
|
||||
|
||||
$table->foreign('lodging_id', 'FK_36537F7487335AF1')->references('id')->on('fewo_lodging')->onDelete('SET NULL
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_reservation');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateFewoSeasonTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('fewo_season', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 255);
|
||||
$table->date('from_date');
|
||||
$table->date('to_date');
|
||||
$table->integer('minimum_stay');
|
||||
$table->longText('description')->nullable();
|
||||
$table->integer('only_weekday')->nullable();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('fewo_season');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateTravelBookingFewoChannelsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('travel_booking_fewo_channels', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$seed = array(
|
||||
array('name'=>'Fewo-Direkt'),
|
||||
array('name'=>'HRS'),
|
||||
array('name'=>'Booking.com'),
|
||||
array('name'=>'Traum-Ferienwohnungen.de'),
|
||||
array('name'=>'Stammkunde'),
|
||||
array('name'=>'Kunde von Frau Nikolai'),
|
||||
);
|
||||
DB::connection('mysql_stern')->table('travel_booking_fewo_channels')->insert($seed);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('travel_booking_fewo_channels');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateTravelUserBookingFewosTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('travel_user_booking_fewos', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('travel_user_id')->index();
|
||||
$table->integer('fewo_lodging_id')->index();
|
||||
|
||||
$table->string('invoice_number')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('persons')->nullable();
|
||||
$table->unsignedTinyInteger('adults')->nullable();
|
||||
$table->unsignedTinyInteger('children')->nullable();
|
||||
|
||||
$table->timestamp('booking_date')->useCurrent = true;
|
||||
|
||||
$table->date('from_date')->nullable();
|
||||
$table->date('to_date')->nullable();
|
||||
|
||||
$table->text('daily_prices')->nullable();
|
||||
$table->decimal('price_travel', 13, 2)->nullable();
|
||||
$table->decimal('price_deposit', 8, 2)->nullable();
|
||||
$table->decimal('price_service', 8, 2)->nullable();
|
||||
$table->decimal('price_total', 13, 2)->nullable();
|
||||
|
||||
|
||||
$table->unsignedInteger('travel_booking_fewo_channel_id')->index();
|
||||
|
||||
$table->text('notice')->nullable();
|
||||
|
||||
|
||||
$table->boolean('is_calendar_fewo_direct')->default(false); // Fewo-Direkt, HRS und STERN TOUR
|
||||
$table->boolean('is_calendar_hrs')->default(false);
|
||||
$table->boolean('is_calendar_stern_tours')->default(false);
|
||||
|
||||
$table->unsignedTinyInteger('status')->default(0);
|
||||
$table->text('status_text')->nullable();
|
||||
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
||||
|
||||
$table->foreign('fewo_lodging_id')
|
||||
->references('id')
|
||||
->on('fewo_lodging')
|
||||
->onDelete('CASCADE');
|
||||
|
||||
$table->foreign('travel_user_id')
|
||||
->references('id')
|
||||
->on('travel_users')
|
||||
->onDelete('CASCADE');
|
||||
|
||||
|
||||
$table->foreign('travel_booking_fewo_channel_id')
|
||||
->references('id')
|
||||
->on('travel_booking_fewo_channels');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('travel_user_booking_fewos');
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateTravelCountryTable extends Migration
|
||||
class CreateSalutationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
|
|
@ -17,13 +17,12 @@ class CreateTravelCountryTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('travel_country', function (Blueprint $table) {
|
||||
Schema::create('salutation', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
$table->tinyInteger('is_customer_country')->nullable()->default(false);
|
||||
$table->boolean('active_backend')->nullable()->default(false);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -33,6 +32,6 @@ class CreateTravelCountryTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('travel_country');
|
||||
Schema::dropIfExists('salutation');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
38
database/migrations/sym/0002_sym_salutation_table.php
Executable file
38
database/migrations/sym/0002_sym_salutation_table.php
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateTravelCountryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('travel_country', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
$table->tinyInteger('is_customer_country')->nullable()->default(false);
|
||||
$table->boolean('active_backend')->nullable()->default(false);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('travel_country');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue