mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
schedule-update-delete-backend
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class CreateForwarderTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('forwarder', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50);
|
||||
$table->string('email', 80)->nullable();
|
||||
$table->string('street_one', 80)->nullable();
|
||||
$table->string('street_two', 80)->nullable();
|
||||
$table->string('city', 50)->nullable();
|
||||
$table->string('state', 50)->nullable();
|
||||
$table->string('post_code', 10)->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->float('shipping_rate');
|
||||
$table->integer('overdue_days')->nullable();
|
||||
$table->float('markup_percentage')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
DB::table('forwarder')->insert(
|
||||
[
|
||||
'name' => 'CIEF Worldwide SDN BHD',
|
||||
'email' => 'infociefworldwide@gmail.com',
|
||||
'street_one' => 'Malaysian Global Innovation & Creativity Centre(MaGIC)',
|
||||
'street_two' => ' CWS Block, 3730, Persiaran Apec',
|
||||
'city' => 'Cyberjaya',
|
||||
'state' => 'Selangor',
|
||||
'post_code' => '63000',
|
||||
'country' => 'Malaysia',
|
||||
'shipping_rate' => '300',
|
||||
'overdue_days' => '0',
|
||||
'markup_percentage' => '0',
|
||||
'created_at' => \Carbon\Carbon::now(),
|
||||
'updated_at' => \Carbon\Carbon::now()
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('forwarder');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateLocationFeesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('location_fees', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('forwarder_id')->unsigned()->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->float('rate')->nullable();
|
||||
$table->float('outstation_rate')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('location_fees');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateServiceFeesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('service_fees', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->float('cost')->nullable();
|
||||
$table->integer('forwarder_id')->unsigned()->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('service_fees');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCustomerRelationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('customer_relation', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('forwarder_id')->unsigned()->nullable();
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->string('customer_rate')->nullable();
|
||||
$table->float('wave')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('customer_relation');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user