feat: 项目基础框架+配置+Kernel

This commit is contained in:
testadmin
2026-04-29 05:35:00 +08:00
parent 6ce7adcbfb
commit 9a6151fce3
5082 changed files with 437062 additions and 0 deletions
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAccountLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('account_log', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id')->default(0);
$table->decimal('value',20,5)->default(0);
$table->unsignedInteger('created_time')->default(0);
$table->string('info',255)->default('');
$table->tinyInteger('type')->unsigned()->default(0);
$table->unsignedInteger('currency')->default(0);
$table->index('user_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('account_log');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admin', function (Blueprint $table) {
$table->increments('id');
$table->string('username',50)->default('');
$table->string('password',40)->default('');
$table->tinyInteger('role_id')->default(0)->length(1);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admin');
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminModuleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admin_module', function (Blueprint $table) {
$table->increments('id');
$table->string('name',50)->default('');
$table->string('module',50)->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admin_module');
}
}
@@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminModuleActionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admin_module_action', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('admin_module_id')->default(0);
$table->string('name',50)->default('');
$table->string('action',50)->default('');
$table->tinyInteger('level')->default(0)->length(4);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admin_module_action');
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminRoleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admin_role', function (Blueprint $table) {
$table->increments('id');
$table->string('name',50)->default('');
$table->unsignedTinyInteger('is_super')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admin_role');
}
}
@@ -0,0 +1,41 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAutoListTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('auto_list', function (Blueprint $table) {
$table->increments('id');
$table->integer('buy_user_id')->default(0)->comment('买方user_id');
$table->integer('sell_user_id')->default(0)->comment('卖方user_id');
$table->integer('currency_id')->default(0)->comment('币种id');
$table->integer('legal_id')->default(0)->comment('法币id');
$table->decimal('min_price',20,5)->default(0)->comment('最低');
$table->decimal('max_price',20,5)->default(0)->comment('最高');
$table->decimal('min_number',20,5)->default(0);
$table->decimal('max_number',20,5)->default(0);
$table->integer('need_second')->default(0);
$table->integer('create_time')->default(0);
$table->tinyInteger('is_start')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('auto_list');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminRolePermissionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admin_role_permission', function (Blueprint $table) {
$table->increments('id');
$table->integer('role_id')->default(0);
$table->string('module',50)->default('');
$table->string('action',50)->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admin_role_permission');
}
}
@@ -0,0 +1,31 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBankTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bank', function (Blueprint $table) {
$table->increments('id');
$table->string('name',60)->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bank');
}
}
@@ -0,0 +1,48 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCurrencyTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currency', function (Blueprint $table) {
$table->increments('id');
$table->string('name',60)->default('');
$table->string('get_address',60)->default('');
$table->integer('sort')->default(0);
$table->string('logo',60)->default('');
$table->integer('create_time')->default(0);
$table->tinyInteger('is_display')->default(0)->length(1);
$table->decimal('min_number',23,8)->default(0)->comment('最小提币数量');
$table->decimal('rate',10,2)->default(0)->comment('费率');
$table->tinyInteger('is_lever')->default(0)->length(1)->comment('是否杠杆币 0否 1是');
$table->tinyInteger('is_legal')->default(0)->length(1)->comment('是否法币 0否 1是');
$table->tinyInteger('is_match')->default(0)->length(1)->comment('是否撮合交易 0否 1是');
$table->tinyInteger('show_legal')->default(0)->length(1)->comment('是否显示法币商家 0否 1是');
$table->string('type',20)->default('')->comment('基于哪个区块链');
$table->integer('black_limt')->default(0)->comment('币种黑名单限制数量');
$table->string('key')->default('');
$table->string('contract_address')->default('');
$table->string('total_account')->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('currency');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCurrencyQuotationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currency_quotation', function (Blueprint $table) {
$table->increments('id');
$table->integer('match_id')->default(0)->comment('交易对id');
$table->integer('legal_id')->default(0);
$table->integer('currency_id')->default(0);
$table->string('change')->default('')->comment('涨跌幅 带+ - 号');
$table->decimal('volume',20,5)->default(0)->comment('成交量');
$table->decimal('now_price',20,5)->default(0)->comment('当前价位');
$table->integer('add_time')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('currency_quotation');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFalseDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('false_data', function (Blueprint $table) {
$table->increments('id');
$table->string('address')->default('');
$table->string('price',20)->default('')->comment('log');
$table->integer('time')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('false_data');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFeedbackTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('feedback', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->text('content');
$table->string('img')->default('');
$table->integer('create_time')->default(0);
$table->integer('reply_time')->default(0);
$table->text('reply_content');
$table->tinyInteger('is_reply')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('feedback');
}
}
@@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHistoricalDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('historical_data', function (Blueprint $table) {
$table->increments('id');
$table->string('type',10)->default('');
$table->integer('start_time')->default(0);
$table->integer('end_time')->default(0);
$table->string('data',500)->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('historical_data');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLegalDealTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('legal_deal', function (Blueprint $table) {
$table->increments('id');
$table->integer('legal_deal_send_id')->default(0);
$table->integer('user_id')->default(0);
$table->integer('seller_id')->default(0);
$table->decimal('number', 20, 5)->default(0);
$table->tinyInteger('is_sure')->default(0);
$table->integer('create_time')->default(0);
$table->integer('update_time')->default(0);
$table->index(['legal_deal_send_id','seller_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('legal_deal');
}
}
@@ -0,0 +1,41 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLegalDealSendTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('legal_deal_send', function (Blueprint $table) {
$table->increments('id');
$table->integer('seller_id')->default(0);
$table->integer('currency_id')->default(0);
$table->enum('type',['buy','sell'])->default('sell');
$table->enum('way',['bank','we_chat','ali_pay'])->default('bank');
$table->decimal('price',20,5)->default(0);
$table->decimal('total_number',20,5)->default(0);
$table->decimal('surplus_number',20,5)->default(0);
$table->decimal('min_number',20,5)->default(0);
$table->tinyInteger('is_done')->default(0);
$table->integer('create_time')->default(0);
$table->index(['seller_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('legal_deal_send');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLeverTransactionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lever_transaction', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->decimal('price',20,5)->default(0);
$table->decimal('number',20,5)->default(0);
$table->integer('create_time')->default(0);
$table->integer('currency')->default(0)->length(6);
$table->integer('legal')->default(0)->length(6);
$table->tinyInteger('type')->default(0);
$table->tinyInteger('status')->default(0);
$table->tinyInteger('multiple')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lever_transaction');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMarketTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('market', function (Blueprint $table) {
$table->increments('id');
$table->string('name',60)->default('');
$table->string('symbol',60)->default('');
$table->string('website_slug',60)->default('');
$table->integer('rank')->default(0);
$table->unsignedBigInteger('circulating_supply')->default(0);
$table->unsignedBigInteger('total_supply')->default(0);
$table->unsignedBigInteger('max_supply')->default(0);
$table->text('quotes');
$table->unsignedInteger('last_updated')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('market');
}
}
@@ -0,0 +1,40 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMarketDayTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('market_day', function (Blueprint $table) {
$table->increments('id');
$table->integer('currency_id')->default(0);
$table->integer('legal_id')->default(0);
$table->decimal('start_price',20,5)->default(0);
$table->decimal('end_price',20,5)->default(0);
$table->decimal('highest',20,5)->default(0);
$table->decimal('mminimum',20,5)->default(0);
$table->decimal('number',20,5)->default(0);
$table->string('times',36)->default('');
$table->string('mar_id',100)->default('');
$table->integer('type')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('market_day');
}
}
@@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMarketHourTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('market_hour', function (Blueprint $table) {
$table->increments('id');
$table->integer('currency_id')->default(0);
$table->integer('legal_id')->default(0);
$table->decimal('start_price',20,5)->default(0);
$table->decimal('end_price',20,5)->default(0);
$table->decimal('highest',20,5)->default(0);
$table->decimal('mminimum',20,5)->default(0);
$table->integer('day_time')->default(0);
$table->tinyInteger('type')->default(0);
$table->decimal('number',30,5)->default(0);
$table->string('mar_id',100)->default('');
$table->string('period',100)->default('');
$table->tinyInteger('sign')->default(0);
$table->index(['currency_id','legal_id','day_time','type','period']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('market_hour');
}
}
@@ -0,0 +1,45 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNewsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('news', function (Blueprint $table) {
$table->increments('id');
$table->integer('c_id')->default(0);
$table->string('title',128)->default('');
$table->tinyInteger('recommend')->default(0);
$table->tinyInteger('audit')->default(0);
$table->tinyInteger('display')->default(0);
$table->tinyInteger('discuss')->default(0);
$table->string('author',32)->default('');
$table->tinyInteger('browse_grant')->default(0);
$table->string('keyword')->default('');
$table->string('abstract')->default('');
$table->longText('content');
$table->integer('views')->default(0);
$table->integer('create_time')->default(0);
$table->integer('update_time')->default(0);
$table->string('thumbnail',500)->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('news');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNewsCategoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('news_category', function (Blueprint $table) {
$table->increments('id');
$table->string('name',32)->default('');
$table->integer('sorts')->default(0);
$table->tinyInteger('is_show')->default(0);
$table->integer('create_time')->default(0);
$table->integer('update_time')->default(0);
$table->tinyInteger('site_id')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('news_category');
}
}
@@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRobotTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('robot', function (Blueprint $table) {
$table->increments('id');
$table->integer('currency_id')->default(0);
$table->integer('legal_id')->default(0);
$table->integer('buy_user_id')->default(0);
$table->integer('sell_user_id')->default(0);
$table->integer('create_time')->default(0);
$table->integer('status')->default(0);
$table->integer('second')->default(0);
$table->integer('sell')->default(0);
$table->integer('buy')->default(0);
$table->decimal('number_max',20,5)->default(0);
$table->decimal('number_min',20,5)->default(0);
$table->decimal('float_number_down',20,5)->default(0);
$table->decimal('float_number_up',20,5)->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('robot');
}
}
@@ -0,0 +1,46 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSellerTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('seller', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->string('name',60)->default('');
$table->decimal('seller_balance',20,5)->default(0);
$table->decimal('lock_seller_balance',20,5)->default(0);
$table->string('wechat_nickname',60)->default('');
$table->string('wechat_account',60)->default('');
$table->string('ali_nickname',60)->default('');
$table->string('ali_account',60)->default('');
$table->integer('bank_id')->default(0);
$table->string('bank_account',60)->default('');
$table->string('bank_address',60)->default('');
$table->integer('create_time')->default(0);
$table->integer('currency_id')->default(0);
$table->string('mobile',60)->default('');
$table->index('user_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('seller');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->increments('id');
$table->string('key',25)->default('');
$table->string('value',1000)->default('');
$table->string('notes',255)->default('');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('settings');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTokensTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tokens', function (Blueprint $table) {
$table->increments('id');
$table->string('token')->default('');
$table->integer('time_out')->default(0);
$table->integer('user_id')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tokens');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction', function (Blueprint $table) {
$table->increments('id');
$table->integer('from_user_id')->default(0);
$table->integer('currency')->default(0);
$table->integer('to_user_id')->default(0);
$table->tinyInteger('type')->default(0);
$table->decimal('number',20,5)->default(0);
$table->string('remarks',500)->default('');
$table->integer('time')->default(0);
$table->integer('status')->default(0);
$table->decimal('price',20,5)->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transaction');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionCompleteTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction_complete', function (Blueprint $table) {
$table->increments('id');
$table->tinyInteger('way')->default(0);
$table->integer('user_id')->default(0);
$table->decimal('price',20,5)->default(0);
$table->decimal('number',20,5)->default(0);
$table->integer('create_time')->default(0);
$table->integer('currency')->default(0);
$table->integer('from_user_id')->default(0);
$table->integer('legal')->default(0);
$table->index(['create_time','currency','legal','number','price'],'complete');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transaction_complete');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionInTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction_in', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->decimal('price',20,5)->default(0);
$table->decimal('number',20,5)->default(0);
$table->integer('create_time')->default(0);
$table->integer('currency')->default(0);
$table->integer('legal')->default(0);
$table->index(['price','user_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transaction_in');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionOutTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction_out', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->decimal('price',20,5)->default(0);
$table->decimal('number',20,5)->default(0);
$table->integer('create_time')->default(0);
$table->integer('currency')->default(0);
$table->integer('legal')->default(0);
$table->index(['price','user_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('transaction_out');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserCashInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_cash_info', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->string('bank_name',60)->default('');
$table->string('bank_account',60)->default('');
$table->string('real_name',60)->default('');
$table->string('alipay_account',60)->default('');
$table->string('wechat_nickname',60)->default('');
$table->string('wechat_account',60)->default('');
$table->integer('create_time')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_cash_info');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserChatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_chat', function (Blueprint $table) {
$table->increments('id');
$table->integer('from_user_id')->default(0);
$table->integer('to_user_id')->default(0);
$table->string('content',500)->default('');
$table->tinyInteger('offline')->default(0);
$table->string('type',60)->default('');
$table->integer('add_time')->default(0);
$table->index('from_user_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_chat');
}
}
@@ -0,0 +1,40 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserRealTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_real', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->string('name',60)->default('');
$table->string('card_id',60)->default('');
$table->integer('create_time')->default(0);
$table->tinyInteger('review_status')->default(0);
$table->integer('review_time')->default(0);
$table->string('front_pic')->default('');
$table->string('reverse_pic')->default('');
$table->string('hand_pic',60)->default('');
$table->index('user_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_real');
}
}
@@ -0,0 +1,47 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('account_number',30)->default('');
$table->tinyInteger('type')->default(0);
$table->string('phone',60)->default('');
$table->string('email',60)->default('');
$table->string('password')->default('');
$table->string('pay_password')->default('');
$table->integer('time')->default(0);
$table->integer('parent_id')->default(0);
$table->string('head_portrait',400)->default('');
$table->string('extension_code',10)->default('');
$table->integer('status')->default(0);
$table->string('gesture_password')->default('');
$table->string('is_auth')->default('');
$table->string('nickname')->default('');
$table->string('wallet_address')->default('');
$table->tinyInteger('is_blacklist')->default(0);
$table->index(['account_number','email','is_blacklist','phone','id','wallet_address'],'users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
@@ -0,0 +1,44 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersWalletTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users_wallet', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->integer('currency')->default(0);
$table->string('address',50)->default('');
$table->decimal('legal_balance',20,8)->default(0);
$table->decimal('lock_legal_balance',20,8)->default(0);
$table->decimal('change_balance',20,8)->default(0);
$table->decimal('lock_change_balance',20,8)->default(0);
$table->decimal('lever_balance',20,8)->default(0);
$table->decimal('lock_lever_balance',20,8)->default(0);
$table->integer('status')->default(0);
$table->integer('create_time')->default(0);
$table->decimal('old_balance',20,8)->default(0);
$table->string('private')->default('');
$table->index(['address','currency','user_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users_wallet');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersWalletOutTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users_wallet_out', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->default(0);
$table->integer('currency')->default(0);
$table->string('address',50)->default('');
$table->decimal('number',20,8)->default(0);
$table->integer('create_time')->default(0);
$table->decimal('rate',13,2)->default(0);
$table->tinyInteger('status')->default(0);
$table->text('notes');
$table->decimal('real_number',13,8)->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users_wallet_out');
}
}
@@ -0,0 +1,41 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWalletLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('wallet_log', function (Blueprint $table) {
$table->increments('id');
$table->integer('account_log_id')->default(0);
$table->integer('wallet_id')->default(0);
$table->integer('balance_type')->default(0);
$table->integer('lock_type')->default(0);
$table->decimal('before',20,8)->default(0);
$table->decimal('change',20,8)->default(0);
$table->decimal('after',20,8)->default(0);
$table->string('memo')->default('');
$table->integer('create_time')->default(0);
$table->index(['account_log_id','balance_type','create_time','lock_type','wallet_id'],'wallet_log');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('wallet_log');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCurrencyMatchesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currency_matches', function (Blueprint $table) {
$table->increments('id');
$table->integer('legal_id')->comment('法币id');
$table->integer('currency_id')->comment('币种id');
$table->tinyInteger('is_display')->comment('是否显示');
$table->tinyInteger('market_from')->comment('0.无,1.交易所,2.火币接口');
$table->tinyInteger('open_transaction')->comment('开启撮合交易');
$table->tinyInteger('open_lever')->comment('开启杠杆交易');
$table->integer('sort')->comment('排序');
$table->integer('create_time')->comment('创建时间');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('currency_matches');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jobs');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jobs');
}
}