Commit 1b307f70 authored by Chanon.u's avatar Chanon.u
Browse files

Add migration file for manual response feature

parent 155c2612
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mr_master_messages', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('value');
$table->timestamps();
});
DB::table('mr_master_messages')->insert([
[
'name' => 'export',
'value' => 'EXPORT',
],
[
'name' => 'import',
'value' => 'IMPORT',
],
[
'name' => 'gcl',
'value' => 'GCL',
],
[
'name' => 'short',
'value' => 'SHORT',
]
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mr_master_messages');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('mr_master_response_templates');
Schema::create('mr_master_response_templates', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('mid');
$table->string('code');
$table->string('type');
$table->string('name');
$table->string('description');
$table->text('template');
$table->timestamps();
// Foreign key constraint
// onDelete('cascade'); means when delete data from main table, sub table will be deleted too.
$table->foreign('mid')->references('id')->on('master_messages')->onDelete('cascade');
});
DB::table('mr_master_response_templates')->insert([
//Export
[
'mid' => 1,
'code' => '0209',
'type' => 'XDCA',
'name' => 'DECLARATION ACCEPTED',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"DECLARATION ACCEPTED"}}}}'
],
[
'mid' => 1,
'code' => '0300',
'type' => 'GCLD',
'name' => 'พบหน่วยงานผู้ออกใบอนุญาตหรือใบรับรองอิเล็กทรอนิกส์เพื่อตรวจสอบของ',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-SIT-01","LoadPort":"0010","Message":"พบหน่วยงานผู้ออกใบอนุญาตหรือใบรับรองอิเล็กทรอนิกส์เพื่อตรวจสอบของ","AuditDateTime":""}}}}'
],
[
'mid' => 1,
'code' => '0301',
'type' => 'GCLD',
'name' => 'Goods Transition Control Already Checked ให้มาตรวจของที่ท่าที่ส่งออก',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-SIT-01","LoadPort":"0010","Message":"Goods Transition Control Already Checked ให้มาตรวจของที่ท่าที่ส่งออก","AuditDateTime":""}}}}'
],
[
'mid' => 1,
'code' => '0309',
'type' => 'GCLD',
'name' => 'Goods Transition Control Already Checked',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-SIT-01","LoadPort":"0010","Message":"Goods Transition Control Already Checked","AuditDateTime":""}}}}'
],
[
'mid' => 1,
'code' => '0409',
'type' => 'GCLD',
'name' => 'GOODS LOADED',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-SIT-01","LoadPort":"0010","Message":"GOODS LOADED","AuditDateTime":""}}}}'
],
[
'mid' => 1,
'code' => 'REJECT',
'type' => 'XDCR',
'name' => 'REJECT',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XDCR","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationReject":{"ItemNumber":"0","ErrorCode":"GDEX-00044","Message":"INVALID DEPARTURE DATE"}}}}'
],
[
'mid' => 1,
'code' => 'CANCEL ACCEPTED',
'type' => 'XCDA',
'name' => 'DECLARATION CANCELED',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XCDA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"CancelDocumentAccept":{"DocumentNumber":"","Message":"DECLARATION CANCELED"}}}}'
],
[
'mid' => 1,
'code' => 'CANCEL REJECT',
'type' => 'XCDR',
'name' => 'INVALID DECLARATION NUMBER',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XCDR","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"CancelDocumentReject":{"DocumentNumber":"","ErrorCode":"CLGD-00016","Message":"DECLARATION STATUS CAN NOT CANCEL"}}}}'
],
[
'mid' => 1,
'code' => '9904',
'type' => 'GCLD',
'name' => 'Goods Transition Control Already Cancel Matching',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-SIT-01","LoadPort":"0010","Message":"Goods Transition Control Already Cancel Matching","AuditDateTime":""}}}}'
],
//Import
[
'mid' => 2,
'code' => '0109',
'type' => 'IDCA',
'name' => 'พร้อมที่จะชำระเงินค่าภาษีอากรที่หน่วยงานของกรมศุลกากร',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"พร้อมที่จะชำระเงินค่าภาษีอากรที่หน่วยงานของกรมศุลกากร"}}}}'
],
[
'mid' => 2,
'code' => '0209',
'type' => 'IDCA',
'name' => 'DECLARATION ACCEPTED',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"DECLARATION ACCEPTED"}}}}'
],
[
'mid' => 2,
'code' => '0209',
'type' => 'IDCA',
'name' => 'รอการตัดบัญชีธนาคาร',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"รอการตัดบัญชีธนาคาร"}}}}'
],
[
'mid' => 2,
'code' => '0209',
'type' => 'PMTA',
'name' => 'ได้รับการชำระเงินเรียบร้อยแล้ว',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"PMTA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"DeclarationNumber":"","Status":"A","PaymentType":"PMT","Message":"ได้รับการชำระเงินเรียบร้อยแล้ว","PaymentNumber":"123456","BankTransactionNumber":"FCN0000000001","TotalAmount":"1000"}}}}'
],
[
'mid' => 2,
'code' => '0301',
'type' => 'IDCA',
'name' => 'สินค้าต้องตรวจสอบ',
'description' => 'R',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"สินค้าต้องตรวจสอบ"}}}}'
],
[
'mid' => 2,
'code' => '0309',
'type' => 'IDCA',
'name' => 'ไม่ต้องตรวจสอบพิกัดศุลกากร ราคาและของ ไปรับของ ที่ท่าหรือที่นำเข้า',
'description' => 'G',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"ไม่ต้องตรวจสอบพิกัดศุลกากร ราคาและของ ไปรับของ ที่ท่าหรือที่นำเข้า"}}}}'
],
[
'mid' => 2,
'code' => '0409',
'type' => 'IDCA',
'name' => 'ส่งมอบสินค้า',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationAccept":{"Status":"00","DeclarationNumber":"","TotalTax":"1000","TotalDeposit":"0","ReleasePort":"1193","Message":"ส่งมอบสินค้า"}}}}'
],
[
'mid' => 2,
'code' => 'REJECT',
'type' => 'IDCR',
'name' => 'REJECT',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCR","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"DeclarationReject":{"ItemNumber":"0","ErrorCode":"ITEM-00058","Message":"INVALID DISCHARGE PORT"}}}}'
],
[
'mid' => 2,
'code' => 'ERR_TRANS',
'type' => 'ERR_TRANS',
'name' => 'Error Trans',
'description' => '',
'template' => '{"root":"ErrorMessage","namespace":null,"DocumentDetails":{"TransactionNo":"E06@240209210907_418","ReferenceNo":"","ErrorType":"ERR_TRANS","ErrorItems":"1","ErrorDate":"","ErrorDescription":"Value too short, length = 0. Facet minLength = 1. element=\'CustomsImportDeclaration[1]/SEQUENCE1[1]/DocumentControl[1]/SEQUENCE1[1]/BorderTransportMeans[1]/SEQUENCE1[1]/VesselName\'. At line = 1149 column = 1."}}'
],
[
'mid' => 2,
'code' => 'CANCEL ACCEPTED',
'type' => 'XCDA',
'name' => 'DECLARATION CANCELED',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XCDA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"CancelDocumentAccept":{"DocumentNumber":"","Message":"DECLARATION CANCELED"}}}}'
],
[
'mid' => 2,
'code' => 'CANCEL REJECT',
'type' => 'XCDR',
'name' => 'INVALID DECLARATION NUMBER',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XCDR","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"CancelDocumentReject":{"DocumentNumber":"","ErrorCode":"CLGD-00008","Message":"INVALID DECLARATION NUMBER"}}}}'
],
//GCL
[
'mid' => 3,
'code' => '0209',
'type' => 'GCLA',
'name' => 'GOODS CONTROL ACCEPT',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsTransitionAccept":{"GoodsTransitionNumber":"","ContainerNumber":"CONT-A0102723-1","LoadPort":"2801","Message":"GOODS CONTROL ACCEPT"}}}}'
],
[
'mid' => 3,
'code' => '0209',
'type' => 'GCLA_BKK',
'name' => 'GOODS CONTROL ACCEPT (Port)',
'description' => 'PORT',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLA_BKK","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsTransitionAccept":{"GoodsTransitionNumber":"","ContainerNumber":"CONT-A0102723-1","LoadPort":"2801","Message":"GOODS CONTROL ACCEPT"}}}}'
],
[
'mid' => 3,
'code' => '0301',
'type' => 'GCLD',
'name' => 'Goods Transition Control Already Checked ให้มาตรวจของที่ท่าที่ส่งออก',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0041010353980000000010001T5","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-SIT-02","LoadPort":"0010","Message":"Goods Transition Control Already Checked","AuditDateTime":""}}}}'
],
[
'mid' => 3,
'code' => '0309',
'type' => 'GCLD',
'name' => 'Goods Transition Control Already Checked',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0041010353980000000010001T5","DocumentDetail":{"GoodsAudit":{"GoodsTransitionNumber":"","ContainerNumber":"CONT-SIT-02","LoadPort":"0010","Message":"Goods Transition Control Already Checked","AuditDateTime":""}}}}'
],
[
'mid' => 3,
'code' => 'REJECT',
'type' => 'GCLR',
'name' => 'REJECT',
'description' => 'INVALID CONTAINER SIZE AND TYPE CODE',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLR","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsTransitionReject":{"DeclarationNumber":"","ContainerNumber":"CONT-A0102723-1","ErrorCode":"GCEX-00052 ","Message":"INVALID CONTAINER SIZE AND TYPE CODE"}}}}'
],
[
'mid' => 3,
'code' => 'CANCEL ACCEPT',
'type' => 'XCDA',
'name' => 'CANCEL',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"XCDA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"CancelDocumentAccept":{"DocumentNumber":"","Message":"CONT-A0102723-1"}}}}'
],
[
'mid' => 3,
'code' => 'CANCEL MATCHING',
'type' => 'GCLD',
'name' => 'CANCEL MATCHING',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"GCLD","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"GoodsAudit":{"DeclarationNumber":"","ContainerNumber":"CONT-A0102723-1","LoadPort":"2801","Message":"Goods Transition Control Already Cancel Matching","AuditDateTime":""}}}}'
],
//SHORT
[
'mid' => 4,
'code' => '9980',
'type' => 'SDCA',
'name' => 'SHORT DECLARATION ACCEPTED',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"IDCA","ReferenceNumber":"","RegistrationID":"TH0101075570001010000000001T0","DocumentDetail":{"ShortDeclarationAccept":{"DeclarationNumber":"","Message":"SHORT DECLARATION ACCEPTED"}}}}'
],
[
'mid' => 4,
'code' => '0000',
'type' => 'SDCR',
'name' => 'SHORT DECLARATION REJECT',
'description' => '',
'template' => '{"root":"CustomsResponse","namespace":"http://ebxml.customs.go.th/XMLSchema/CustomsResponse_8_00","DocumentControl":{"MessageType":"SDCR","ReferenceNumber":"","RegistrationID":"TH0041010353980000000010001T5","DocumentDetail":{"ShortDeclarationReject":{"DeclarationNumber":"","DeclarationLineNumber":"0","ErrorCode":"SHEX-00029","Message":"CAN NOT SHORT IF DECLARATION ITEM MORE THAN 1 ITEM AND SOME VALUE IN ITEM = 0"}}}}'
],
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mr_master_response_templates');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mr_declaration_running', function (Blueprint $table) {
$table->id();
$table->string('document_type');
$table->integer('running_number')->default(0);
$table->date('last_updated_date');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mr_declaration_runnings');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mr_master_doc_types', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('mid');
$table->string('code');
$table->string('name');
$table->string('mode');
$table->timestamps();
$table->foreign('mid')->references('id')->on('master_messages')->onDelete('cascade');
});
DB::table('mr_master_doc_types')->insert([
['mid' => '2', 'code' => '0', 'name' => '0-ใบขนสินค้าขาเข้า', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => '2', 'name' => '2-ใบขนสินค้าผ่านแดน (Transit)', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => '3', 'name' => '3-คำร้องขอรับของไปก่อน', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => '5', 'name' => '5-ใบขนสินค้าขาเข้าปากระวาง', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => '8', 'name' => '8-ใบขนสินค้าถ่ายลำ (Transhipment)', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => 'A', 'name' => 'A-ใบขนสินค้าขาเข้าโอนย้ายในประเทศ', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => 'C', 'name' => 'C-ใบขนสินค้าขาเข้าโอนย้ายจากเขตปลอดอากร', 'mode' => 'IMDECL'],
['mid' => '1', 'code' => '1', 'name' => '1-ใบขนสินค้าขาออก', 'mode' => 'EXDECL'],
['mid' => '1', 'code' => '4', 'name' => '4-คำร้องขอออกของไปก่อน', 'mode' => 'EXDECL'],
['mid' => '1', 'code' => 'B', 'name' => 'B-ใบขนสินค้าขาออกโอนย้ายภายในประเทศ', 'mode' => 'EXDECL'],
['mid' => '1', 'code' => 'D', 'name' => 'D-ใบขนสินค้าขาออกโอนย้ายเข้าเขตปลอดอากร', 'mode' => 'EXDECL'],
['mid' => '1', 'code' => '6', 'name' => '6-ใบขนสินค้าพิเศษผ่านแดนขาออก', 'mode' => 'EXDECL'],
['mid' => '1', 'code' => 'H', 'name' => 'H-คำร้องขอนำออกนอกเขตอารักขาศุลกากร', 'mode' => 'EXDECL'],
['mid' => '1', 'code' => 'Y', 'name' => 'Y-ใบขนสินค้าขาออกเร่งด่วน', 'mode' => 'EXDECL'],
['mid' => '2', 'code' => 'X', 'name' => 'X-ใบขนสินค้าขาเข้าเร่งด่วน', 'mode' => 'IMDECL'],
['mid' => '2', 'code' => 'P', 'name' => 'P-ใบขนสินค้าขาเข้าโอนย้ายชำระค่าภาษีอากร', 'mode' => 'IMDECL'],
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mr_master_doc_types');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mr_users_connect_spn', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('uid');
$table->string('username');
$table->string('password');
$table->string('link');
$table->timestamps();
$table->foreign('uid')->references('id')->on('users')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mr_users_connect_spn');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mr_tab_manual_response_log', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('uid');
$table->string('title');
$table->string('detail');
$table->text('xml_content');
$table->string('reference_number');
$table->string('declaration_number');
$table->string('link');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mr_tab_manual_response_log');
}
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment