Komp / Max Produkt,
This commit is contained in:
parent
a4c76d06fa
commit
78f43169c8
19 changed files with 347 additions and 51 deletions
|
|
@ -69,6 +69,11 @@ class CreateProductsTable extends Migration
|
|||
|
||||
|
||||
$table->string('identifier', 20)->nullable();
|
||||
$table->boolean('shipping_addon')->default(false);
|
||||
$table->boolean('max_buy')->default(false);
|
||||
$table->tinyInteger('max_buy_num')->unsigned()->nullable()->default(0);
|
||||
|
||||
|
||||
$table->string('action')->nullable();
|
||||
|
||||
//is an upgrade product, set this product id by payments API paid
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProductBuysTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('product_buys', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('auth_user_id');
|
||||
$table->unsignedInteger('product_id');
|
||||
$table->unsignedTinyInteger('num')->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products');
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('product_buys');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue