mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-29 17:34:06 +00:00
completed the testing for the wrn, fixing testing error for so
This commit is contained in:
@@ -12,14 +12,50 @@ use Faker\Generator as Faker;
|
||||
| model instances for testing / seeding your application's database.
|
||||
|
|
||||
*/
|
||||
// Manually creating the relationship tree.
|
||||
|
||||
$factory->define(App\So::class, function (Faker $faker) {
|
||||
return [
|
||||
'ff_id'=>'testing',
|
||||
'ff_id'=>'1',
|
||||
'supplier_company_name'=>'testing',
|
||||
'supplier_contact_person'=>'testing',
|
||||
'supplier_contact_person_no'=>'12345',
|
||||
'delivery_id'=>'12345',
|
||||
'warehouse_id'=>'testing',
|
||||
];
|
||||
'supplier_contact_person_no'=>'1',
|
||||
'delivery_id'=>'1',
|
||||
'warehouse_id'=>'1',
|
||||
'soitem' => [
|
||||
0 => [
|
||||
'so_id'=> '1',
|
||||
'status'=> '1',
|
||||
'order_id'=> '1',
|
||||
'brand_no'=> '1',
|
||||
'model_no'=> '1',
|
||||
'item_code'=> '1',
|
||||
'quantity_of_item'=> '1',
|
||||
'uom'=> 'testing',
|
||||
'quantity_of_carton'=> '1',
|
||||
'packaging_type'=> 'testing',
|
||||
'packaging_height'=> '1',
|
||||
'packaging_width'=> '1',
|
||||
'packaging_depth'=> '1',
|
||||
'packaging_gross'=> '1',
|
||||
'packaging_nett'=> '1',
|
||||
],
|
||||
1 => [
|
||||
'so_id'=> '1',
|
||||
'status'=> '1',
|
||||
'order_id'=> '1',
|
||||
'brand_no'=> '1',
|
||||
'model_no'=> '1',
|
||||
'item_code'=> '1',
|
||||
'quantity_of_item'=> '1',
|
||||
'uom'=> 'testing',
|
||||
'quantity_of_carton'=> '1',
|
||||
'packaging_type'=> 'testing',
|
||||
'packaging_height'=> '1',
|
||||
'packaging_width'=> '1',
|
||||
'packaging_depth'=> '1',
|
||||
'packaging_gross'=> '1',
|
||||
'packaging_nett'=> '1',
|
||||
]
|
||||
]
|
||||
];
|
||||
});
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This directory should contain each of the model factory definitions for
|
||||
| your application. Factories provide a convenient way to generate new
|
||||
| model instances for testing / seeding your application's database.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(App\Warehousearr::class, function (Faker $faker) {
|
||||
return [
|
||||
|
||||
'so_id'=> function () {
|
||||
|
||||
return factory(App\So::class)->create()->id;
|
||||
|
||||
},
|
||||
'receive_on'=> '2018-03-01',
|
||||
'transport_company_name'=> 'testing',
|
||||
'consignment_note_no'=> '1',
|
||||
'warehouse_receive_note_no'=> '1',
|
||||
'receiving_person'=> 'testing',
|
||||
'marking_number'=> '1',
|
||||
'image'=> 'testing.jpg',
|
||||
'warehouseitem' => [
|
||||
0 => [
|
||||
'description'=> 'testing',
|
||||
'nominal_ctn'=> '1',
|
||||
'actual_ctn'=> '1',
|
||||
'nominal_measurement'=> '1',
|
||||
'actual_measurement'=> '1',
|
||||
'nominal_weight'=> '1',
|
||||
'actual_weight'=> '1',
|
||||
'balance'=> '1',
|
||||
'isDamaged'=> '1',
|
||||
'status'=> 'testing',
|
||||
'image'=> 'testing.jpg',
|
||||
'wa_id'=> '1',
|
||||
],
|
||||
1 => [
|
||||
'description'=> 'testing',
|
||||
'nominal_ctn'=> '1',
|
||||
'actual_ctn'=> '1',
|
||||
'nominal_measurement'=> '1',
|
||||
'actual_measurement'=> '1',
|
||||
'nominal_weight'=> '1',
|
||||
'actual_weight'=> '1',
|
||||
'balance'=> '2',
|
||||
'isDamaged'=> '1',
|
||||
'status'=> 'testing',
|
||||
'image'=> 'testing.jpg',
|
||||
'wa_id'=> '1',
|
||||
]
|
||||
]
|
||||
];
|
||||
});
|
||||
@@ -13,7 +13,9 @@ class DatabaseSeeder extends Seeder
|
||||
{
|
||||
$this->call(LaratrustSeeder::class);
|
||||
$this->call(UsersTableSeeder::class);
|
||||
//$this->call(UsersTableSeeder::class);
|
||||
$this->call(SoSeeder::class);
|
||||
$this->call(SoSeeder::class);
|
||||
$this->call(SoitemSeeder::class);
|
||||
$this->call(WarehousearrSeeder::class);
|
||||
$this->call(WarehouseitemSeeder::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ class SoSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
DB::table('sos')->insert([
|
||||
|
||||
|
||||
'id' => '99',
|
||||
'ff_id' => '1',
|
||||
'supplier_company_name' => 'SEED',
|
||||
'supplier_contact_person' => 'SEED',
|
||||
|
||||
@@ -18,9 +18,8 @@ class SoitemSeeder extends Seeder
|
||||
|
||||
([
|
||||
|
||||
|
||||
'so_id' => '3',
|
||||
'status' => '0',
|
||||
'so_id' => '99',
|
||||
'status' => '1',
|
||||
'order_id' => '1',
|
||||
'brand_no' => '1',
|
||||
'model_no' => '1',
|
||||
@@ -39,8 +38,8 @@ class SoitemSeeder extends Seeder
|
||||
|
||||
]),
|
||||
([
|
||||
// 'id' => '8',
|
||||
'so_id' => '3',
|
||||
|
||||
'so_id' => '99',
|
||||
'status' => '0',
|
||||
'order_id' => '1',
|
||||
'brand_no' => '1',
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Carbon\Carbon;
|
||||
use App\Warehousearr;
|
||||
|
||||
class WarehousearrSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('warehousearrs')->insert([
|
||||
|
||||
'so_id' => '99',
|
||||
'receive_on'=> Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'transport_company_name'=> 'TEScief',
|
||||
'consignment_note_no'=> '1',
|
||||
'warehouse_receive_note_no'=> '1',
|
||||
'receiving_person'=> 'TEST',
|
||||
'marking_number'=> '1',
|
||||
'image'=> 'test.jpg',
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Carbon\Carbon;
|
||||
use App\Warehouseitem;
|
||||
|
||||
class WarehouseitemSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
DB::table('warehouseitems')->insert([
|
||||
|
||||
([
|
||||
|
||||
'description'=> 'CIEFhuhuuh',
|
||||
'nominal_ctn'=> '1',
|
||||
'actual_ctn'=> '1',
|
||||
'nominal_measurement'=> '1',
|
||||
'actual_measurement'=> '1',
|
||||
'nominal_weight'=> '1',
|
||||
'actual_weight'=> '1',
|
||||
'balance'=> '2',
|
||||
'isDamaged'=> '1',
|
||||
'status'=> 'ok',
|
||||
'image'=> 'test.jpg',
|
||||
'wa_id'=> '1',
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
|
||||
]),
|
||||
([
|
||||
|
||||
'description'=> 'CIEFhuhuuh',
|
||||
'nominal_ctn'=> '1',
|
||||
'actual_ctn'=> '1',
|
||||
'nominal_measurement'=> '1',
|
||||
'actual_measurement'=> '1',
|
||||
'nominal_weight'=> '1',
|
||||
'actual_weight'=> '1',
|
||||
'balance'=> '2',
|
||||
'isDamaged'=> '1',
|
||||
'status'=> 'ok',
|
||||
'image'=> 'test.jpg',
|
||||
'wa_id'=> '1',
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
]),
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user