| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('orders', function (Blueprint $table) { |
||
| 17 | $table->id(); |
||
| 18 | $table->unsignedBigInteger('user_id'); |
||
| 19 | $table->date('shipped_date')->nullable(); |
||
| 20 | $table->decimal('total_price'); |
||
| 21 | $table->decimal('shipping_price')->default(0); |
||
| 22 | $table->text('id_shipping')->nullable(); |
||
| 23 | $table->text('note_delivery')->nullable(); |
||
| 24 | $table->boolean('pick_up_in_shop')->default(false); |
||
| 25 | $table->decimal('order_weight')->default(0); |
||
| 26 | |||
| 27 | |||
| 28 | $table->unsignedBigInteger('status_id'); |
||
| 29 | $table->unsignedBigInteger('payment_type_id'); |
||
| 30 | |||
| 31 | $table->string('telephone')->nullable(); |
||
| 32 | $table->string('address')->nullable(); |
||
| 33 | $table->string('province')->nullable(); |
||
| 34 | $table->string('city')->nullable(); |
||
| 35 | $table->string('cap')->nullable(); |
||
| 36 | |||
| 37 | $table->timestamps(); |
||
| 38 | |||
| 39 | //fk |
||
| 40 | $table->foreign('user_id')->references('id')->on('users'); |
||
| 41 | $table->foreign('status_id')->references('id')->on('statuses_order'); |
||
| 42 | $table->foreign('payment_type_id')->references('id')->on('payment_type'); |
||
| 43 | }); |
||
| 56 |