Membership
This commit is contained in:
parent
37cb2b06c7
commit
21abafb8db
51 changed files with 1549 additions and 493 deletions
|
|
@ -57,6 +57,8 @@ class CreateProductsTable extends Migration
|
|||
$table->string('identifier', 20)->nullable();
|
||||
$table->string('action')->nullable();
|
||||
|
||||
//is an upgrade product, set this product id by payments API paid
|
||||
$table->unsignedInteger('upgrade_to_id')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class CreateShoppingInstancesTable extends Migration
|
|||
$table->string('identifier')->unique()->index();
|
||||
$table->unsignedInteger('user_shop_id');
|
||||
$table->unsignedInteger('auth_user_id');
|
||||
$table->unsignedTinyInteger('payment');
|
||||
$table->unsignedInteger('country_id');
|
||||
$table->string('subdomain');
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ class CreateShoppingOrdersTable extends Migration
|
|||
$table->unsignedInteger('country_id');
|
||||
$table->unsignedInteger('user_shop_id');
|
||||
|
||||
$table->unsignedTinyInteger('payment_for');
|
||||
|
||||
$table->decimal('total', 13, 2)->nullable();
|
||||
$table->decimal('shipping', 8, 2)->nullable();
|
||||
$table->decimal('subtotal', 13, 2)->nullable();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUserHistoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_histories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('user_id');
|
||||
|
||||
$table->unsignedInteger('shopping_order_id')->nullable();
|
||||
$table->unsignedInteger('product_id')->nullable();
|
||||
|
||||
$table->string('action')->index()->nullable();
|
||||
$table->unsignedInteger('referenz')->default(0);
|
||||
$table->string('identifier')->index()->nullable();
|
||||
|
||||
$table->boolean('abo_options')->default(false);
|
||||
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products');
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_histories');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue