Update api requests
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTestTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('test', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('test');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddRevenueToExchangeShiftsTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
if (!Schema::hasColumn('exchange_shifts', 'revenue')) {
|
||||
Schema::table('exchange_shifts', function (Blueprint $table) {
|
||||
$table->decimal('revenue', $precision = 16, $scale = 2)->nullable()->after('closed');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::table('exchange_shifts', function (Blueprint $table) {
|
||||
$table->dropColumn('revenue');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddValueToExchangeActionsTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::table('exchange_actions', function (Blueprint $table) {
|
||||
$table->string('value', 255)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::table('exchange_actions', function (Blueprint $table) {
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeyToClientsTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
|
||||
Schema::table('clients', function (Blueprint $table) {
|
||||
$table->string('user_code')->unique()->change();
|
||||
|
||||
});
|
||||
Schema::table('clients_phone', function (Blueprint $table) {
|
||||
$table->foreign('client_guid')->references('user_code')->on('clients');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::table('clients', function (Blueprint $table) {
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddOrderToOrderbotStorageTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::table('orderbot_storage', function (Blueprint $table) {
|
||||
$table->text('order')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::table('orderbot_storage', function (Blueprint $table) {
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateClientsBarcodesTable extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up() {
|
||||
Schema::create('clients_barcodes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('client_guid');
|
||||
$table->string('code_id');
|
||||
$table->string('name');
|
||||
$table->string('block');
|
||||
$table->string('value');
|
||||
$table->string('symptom_block');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down() {
|
||||
Schema::dropIfExists('clients_barcodes');
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Component\Seeders;
|
||||
|
||||
use App\Models\Subscriber;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AddAfterMenuUploadSubscriber extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Subscriber::add('sync:postmenu', 'hello:gethello', 10);
|
||||
}
|
||||
}
|
||||
17
database/seeders/AddAfterSyncHelloSubscriber.php
Normal file
17
database/seeders/AddAfterSyncHelloSubscriber.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Component\Seeders;
|
||||
|
||||
use App\Models\Subscriber;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AddAfterSyncHelloSubscriber extends Seeder {
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run() {
|
||||
Subscriber::add('sync:gethello', 'v1:getbot', 10);
|
||||
}
|
||||
}
|
||||
23
database/seeders/AddClientGroup.php
Normal file
23
database/seeders/AddClientGroup.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Component\Seeders;
|
||||
|
||||
use App\Component\Models\ClientsGroup;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AddClientGroup extends Seeder {
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run() {
|
||||
if (ClientsGroup::where('code', '0')->count() == 0) {
|
||||
$group = new ClientsGroup([
|
||||
'code' => '0',
|
||||
'name' => 'Без группы',
|
||||
]);
|
||||
$group->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Component\Seeders;
|
||||
|
||||
use App\Models\Right;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AddTestRight extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Right::add('test', 'Тестовый раздел');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user