添加忽略
This commit is contained in:
parent
5d1372f7c7
commit
427370c49f
|
|
@ -3,3 +3,4 @@
|
|||
/.env
|
||||
.database/
|
||||
/storage/logs/
|
||||
/database
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
$config = array();
|
||||
|
||||
$config['db']['master']['host'] = '127.0.0.1';
|
||||
$config['db']['master']['username'] = 'testbzt_cdlfjy_c';
|
||||
$config['db']['master']['password'] = 'CTyRGMfzarFtspbC';
|
||||
$config['db']['master']['port'] = '3306';
|
||||
$config['db']['master']['database'] = 'testbzt_cdlfjy_c';
|
||||
$config['db']['master']['tablepre'] = 'ims_';
|
||||
|
||||
$config['db']['slave_status'] = false;
|
||||
$config['db']['slave']['1']['host'] = '';
|
||||
$config['db']['slave']['1']['username'] = '';
|
||||
$config['db']['slave']['1']['password'] = '';
|
||||
$config['db']['slave']['1']['port'] = '';
|
||||
$config['db']['slave']['1']['database'] = '';
|
||||
$config['db']['slave']['1']['tablepre'] = '';
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateYzSiteSetting extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_site_setting')) {
|
||||
Schema::create('yz_site_setting', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->mediumText('value')->default('')->comment('设置内容');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix()
|
||||
. "yz_site_setting` comment '系统工具--系统工具设置表'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('yz_site_setting');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUploadsTableZgldh extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('uploads')) {
|
||||
Schema::create('uploads', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('disk');
|
||||
$table->string('path');
|
||||
$table->integer('size');
|
||||
$table->integer('user_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('uploads');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddPolymorphicColumnsToUploads extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('uploads')) {
|
||||
Schema::table('uploads', function (Blueprint $table) {
|
||||
$table->integer('uploadable_id')->nullable();
|
||||
$table->string('uploadable_type')->nullable();
|
||||
|
||||
$table->index([
|
||||
'uploadable_id',
|
||||
'uploadable_type'
|
||||
],'uploadable_index');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (!Schema::hasTable('uploads')) {
|
||||
Schema::table('uploads', function (Blueprint $table) {
|
||||
$table->dropIndex('uploadable_index');
|
||||
});
|
||||
Schema::table('uploads', function (Blueprint $table) {
|
||||
$table->dropColumn('uploadable_id');
|
||||
$table->dropColumn('uploadable_type');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSmsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('laravel_sms')) {
|
||||
Schema::create('laravel_sms', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
//to:用于存储手机号
|
||||
$table->string('to')->default('');
|
||||
|
||||
//temp_id:存储模板标记,用于存储任何第三方服务商提供的短信模板标记/id
|
||||
$table->string('temp_id')->default('');
|
||||
|
||||
//data:模板短信的模板数据,建议json格式
|
||||
$table->string('data')->default('');
|
||||
|
||||
//content:内容
|
||||
$table->string('content')->default('');
|
||||
|
||||
//voice_code:语言验证码code
|
||||
$table->string('voice_code')->default('');
|
||||
|
||||
//发送失败次数
|
||||
$table->mediumInteger('fail_times')->default(0);
|
||||
|
||||
//最后一次发送失败时间
|
||||
$table->integer('last_fail_time')->unsigned()->default(0);
|
||||
|
||||
//发送成功时的时间
|
||||
$table->integer('sent_time')->unsigned()->default(0);
|
||||
|
||||
//代理器使用日志,记录每个代理器的发送状态,可用于排错
|
||||
$table->text('result_info')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->engine = 'InnoDB';
|
||||
|
||||
//说明
|
||||
//1:temp_id和data用于发送模板短信。
|
||||
//2:content用于直接发送短信内容,不使用模板。
|
||||
//3:voice_code用于存储语言验证码code。
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('laravel_sms');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods')) {
|
||||
Schema::create('yz_goods', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid')->comment('公众号');
|
||||
$table->integer('brand_id')->nullable()->comment('品牌ID');
|
||||
$table->boolean('type')->nullable()->default(1)->comment('类型');
|
||||
$table->boolean('status')->nullable()->default(1)->comment('状态');
|
||||
$table->integer('display_order')->nullable()->default(0)->comment('排序');
|
||||
$table->string('title', 100)->nullable()->default('')->comment('名称');
|
||||
$table->string('thumb')->nullable()->default('')->comment('主图');
|
||||
$table->text('thumb_url', 65535)->nullable()->comment('其他图片');
|
||||
$table->string('sku', 5)->nullable()->default('')->comment('单位');
|
||||
$table->string('description', 1000)->nullable()->default('')->comment('没有用');
|
||||
$table->text('content', 65535)->nullable()->comment('描述');
|
||||
$table->string('goods_sn', 50)->nullable()->default('')->comment('编号');
|
||||
$table->string('product_sn', 50)->nullable()->default('')->comment('条码');
|
||||
$table->decimal('market_price', 10)->nullable()->default(0.00)->comment('原价');
|
||||
$table->decimal('price', 10)->nullable()->default(0.00)->comment('现价');
|
||||
$table->decimal('cost_price', 10)->nullable()->default(0.00)->comment('成本价');
|
||||
$table->integer('stock')->nullable()->default(0)->comment('库存');
|
||||
$table->integer('reduce_stock_method')->nullable()->default(0)->comment('扣库存方式');
|
||||
$table->integer('show_sales')->nullable()->default(0)->comment('销量');
|
||||
$table->integer('real_sales')->nullable()->default(0)->comment('销量');
|
||||
$table->decimal('weight', 10)->nullable()->default(0.00)->comment('重量');
|
||||
$table->integer('has_option')->nullable()->default(0)->comment('是否启用规格');
|
||||
$table->boolean('is_new')->nullable()->default(0)->index('idx_isnew');
|
||||
$table->boolean('is_hot')->nullable()->default(0)->index('idx_ishot');
|
||||
$table->boolean('is_discount')->nullable()->default(0)->index('idx_isdiscount');
|
||||
$table->boolean('is_recommand')->nullable()->default(0)->index('idx_isrecommand');
|
||||
$table->boolean('is_comment')->nullable()->default(0)->index('idx_iscomment');
|
||||
$table->boolean('is_deleted')->default(0)->index('idx_deleted');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('is_plugin')->unsigned()->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsParamTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_param')) {
|
||||
Schema::create('yz_goods_param', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->integer('goods_id')->nullable()->default(0)->index('idx_goodsid');
|
||||
$table->string('title', 50)->nullable();
|
||||
$table->text('value', 65535)->nullable();
|
||||
$table->integer('displayorder')->nullable()->default(0)->index('idx_displayorder');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_param');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsSpecTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_spec')) {
|
||||
Schema::create('yz_goods_spec', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->integer('goods_id')->nullable()->default(0)->index('idx_goodsid');
|
||||
$table->string('title', 50)->nullable();
|
||||
$table->string('description', 1000)->nullable();
|
||||
$table->boolean('display_type')->nullable()->default(0);
|
||||
$table->text('content', 65535)->nullable();
|
||||
$table->integer('display_order')->nullable()->default(0)->index('idx_displayorder');
|
||||
$table->string('propId')->nullable();
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_spec');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsSpecItemTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_spec_item')) {
|
||||
Schema::create('yz_goods_spec_item', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->integer('specid')->nullable()->default(0)->index('idx_specid');
|
||||
$table->string('title')->nullable();
|
||||
$table->string('thumb')->nullable();
|
||||
$table->integer('show')->nullable()->default(0)->index('idx_show');
|
||||
$table->integer('display_order')->nullable()->default(0)->index('idx_displayorder');
|
||||
$table->string('valueId')->nullable();
|
||||
$table->integer('virtual')->nullable()->default(0);
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_spec_item');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberCartTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_cart')) {
|
||||
Schema::create('yz_member_cart', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('member_id')->comment('会员id');
|
||||
$table->integer('uniacid')->comment('公众号id');
|
||||
$table->integer('goods_id')->comment('商品id');
|
||||
$table->integer('total')->comment('数量');
|
||||
$table->integer('price')->comment('价格');
|
||||
$table->integer('option_id')->comment('规格id');
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at');
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_cart` comment '会员--购物车'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_cart');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberFavoriteTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_favorite')) {
|
||||
Schema::create('yz_member_favorite', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('member_id')->comment('会员ID');
|
||||
$table->integer('uniacid');
|
||||
$table->integer('goods_id')->comment('商品id');
|
||||
$table->integer('created_at');
|
||||
$table->boolean('deleted');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_favorite` comment '会员--会员喜欢的商品'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_favorite');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberGroupTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_group')) {
|
||||
Schema::create('yz_member_group', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->comment('公众号');
|
||||
$table->string('group_name', 45)->comment('分组名称');
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at');
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_group` comment '会员--分组'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_group');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberHistoryTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_history')) {
|
||||
Schema::create('yz_member_history', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('member_id')->comment('会员id');
|
||||
$table->integer('uniacid');
|
||||
$table->integer('goods_id')->comment('商品id');
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at');
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_history` comment '会员--浏览历史'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_history');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberLevelTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_level')) {
|
||||
Schema::create('yz_member_level', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->integer('level')->comment('等级阶级');
|
||||
$table->string('level_name', 45)->comment('等级名称');
|
||||
$table->string('order_money', 45)->nullable();
|
||||
$table->string('order_count', 45)->nullable();
|
||||
$table->integer('goods_id')->nullable()->comment('商品id');
|
||||
$table->string('discount', 45)->nullable()->comment('折扣');
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at');
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_level` comment '会员--等级'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_level');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberAppWechatTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_app_wechat')) {
|
||||
Schema::create('yz_member_app_wechat', function (Blueprint $table) {
|
||||
$table->integer('app_wechat_id')->primary();
|
||||
$table->integer('uniacid')->comment('公众号');
|
||||
$table->integer('member_id')->comment('会员id');
|
||||
$table->string('openid', 50)->comment('openid');
|
||||
$table->string('nickname', 20)->comment('昵称');
|
||||
$table->string('avatar')->comment('头像');
|
||||
$table->boolean('gender')->default(0)->comment('性别0未知1男2女');
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
$table->integer('updated_at')->unsigned()->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_member_app_wechat comment '微信APP登录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_app_wechat');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberWechatTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_wechat')) {
|
||||
Schema::create('yz_member_wechat', function (Blueprint $table) {
|
||||
$table->integer('wechat_id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->integer('member_id')->index('idx_member_id')->comment('会员id');
|
||||
$table->string('openid', 50)->comment('唯一标识');
|
||||
$table->string('nickname', 20)->comment('昵称');
|
||||
$table->boolean('gender')->default(0)->comment('性别0未知1男2女');
|
||||
$table->string('avatar')->comment('头像');
|
||||
$table->string('province', 4)->comment('省');
|
||||
$table->string('city', 25)->comment('市');
|
||||
$table->string('country', 10)->comment('国家');
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
$table->integer('updated_at')->unsigned()->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_wechat` comment '会员--app端辅助表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_wechat');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberMiniAppTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_mini_app')) {
|
||||
Schema::create('yz_member_mini_app', function (Blueprint $table) {
|
||||
$table->integer('mini_app_id', true);
|
||||
$table->integer('uniacid')->comment('公众号');
|
||||
$table->integer('member_id')->comment('会员id');
|
||||
$table->string('openid', 50)->comment('唯一标识');
|
||||
$table->string('nickname', 20)->comment('昵称');
|
||||
$table->string('avatar')->comment('头像');
|
||||
$table->boolean('gender')->comment('性别0未知1男2女');
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
$table->integer('updated_at')->unsigned()->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_mini_app` comment '会员--小程序辅助表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_mini_app');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzAccountOpenConfigTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_account_open_config')) {
|
||||
Schema::create('yz_account_open_config', function (Blueprint $table) {
|
||||
$table->integer('config_id')->primary();
|
||||
$table->integer('uniacid')->default(0);
|
||||
$table->string('app_key', 64);
|
||||
$table->string('app_secret', 64);
|
||||
$table->boolean('type')->default(0);
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
$table->integer('updated_at')->unsigned()->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_account_open_config');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberQqTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_qq')) {
|
||||
Schema::create('yz_member_qq', function (Blueprint $table) {
|
||||
$table->integer('qq_id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->integer('member_id');
|
||||
$table->string('nickname');
|
||||
$table->string('figureurl');
|
||||
$table->string('figureurl_1');
|
||||
$table->string('figureurl_2');
|
||||
$table->string('figureurl_qq_1');
|
||||
$table->string('figureurl_qq_2');
|
||||
$table->boolean('gender')->default(0);
|
||||
$table->string('is_yellow_year_vip', 45)->default('0');
|
||||
$table->integer('vip')->default(0);
|
||||
$table->boolean('yellow_vip_level')->default(0);
|
||||
$table->boolean('level')->default(0);
|
||||
$table->boolean('is_yellow_vip')->default(0);
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
$table->integer('updated_at')->unsigned()->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_qq');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzQqConfigTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_qq_config')) {
|
||||
Schema::create('yz_qq_config', function (Blueprint $table) {
|
||||
$table->integer('config_id')->primary();
|
||||
$table->integer('uniacid')->default(0);
|
||||
$table->string('app_key', 64);
|
||||
$table->string('app_secret', 64);
|
||||
$table->boolean('type')->default(0);
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
$table->integer('updated_at')->unsigned()->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_qq_config');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member')) {
|
||||
Schema::create('yz_member', function (Blueprint $table) {
|
||||
$table->integer('member_id')->index('idx_member_id')->comment('会员id');
|
||||
$table->integer('uniacid')->index('idx_uniacid')->comment('公众号');
|
||||
$table->integer('parent_id')->nullable()->comment('上级id');
|
||||
$table->integer('group_id')->default(0)->comment('会员组id');
|
||||
$table->integer('level_id')->default(0)->comment('会员等级id');
|
||||
$table->integer('inviter')->nullable()->default(0)->comment('是否有上线 0-没有锁定上线;1-有锁定上线');
|
||||
$table->boolean('is_black')->default(0)->comment('黑名单 0-普通会员;1-黑名单会员');
|
||||
$table->string('province_name', 15)->nullable()->comment('省名称');
|
||||
$table->string('city_name', 15)->nullable()->comment('市名称');
|
||||
$table->string('area_name', 15)->nullable()->comment('区名称');
|
||||
$table->integer('province')->nullable()->comment('省编号');
|
||||
$table->integer('city')->nullable()->comment('市编号');
|
||||
$table->integer('area')->nullable()->comment('区编号');
|
||||
$table->text('address', 65535)->nullable()->comment('详细地址');
|
||||
$table->string('referralsn', 255)->nullable();
|
||||
$table->boolean('is_agent')->nullable()->comment('是否有审核资格 0-没有;1-有');
|
||||
$table->string('alipayname')->nullable()->comment('支付宝账号名称');
|
||||
$table->string('alipay')->nullable()->comment('支付宝账号');
|
||||
$table->text('content', 65535)->nullable()->comment('备注');
|
||||
$table->integer('status')->nullable()->default(0)->comment('推广审核状态0-未申请;1-审核中;2-审核通过');
|
||||
$table->integer('child_time')->nullable()->default(0)->comment('成为下线时间');
|
||||
$table->integer('agent_time')->nullable()->default(0)->comment('获取发展下线资格时间');
|
||||
$table->integer('apply_time')->nullable()->default(0)->comment('资格申请时间');
|
||||
$table->string('relation', 255)->nullable()->comment('会员关系字段');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member` comment '会员--商城辅助表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzCategoryTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_category')) {
|
||||
Schema::create('yz_category', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('thumb')->nullable();
|
||||
$table->integer('parent_id')->nullable()->default(0)->index('idx_parentid');
|
||||
$table->string('description', 500)->nullable();
|
||||
$table->boolean('display_order')->nullable()->default(0)->index('idx_displayorder');
|
||||
$table->boolean('enabled')->nullable()->default(1)->index('idx_enabled');
|
||||
$table->boolean('is_home')->nullable()->default(0)->index('idx_ishome');
|
||||
$table->string('adv_img')->nullable()->default('');
|
||||
$table->string('adv_url', 500)->nullable()->default('');
|
||||
$table->boolean('level')->nullable()->default(0);
|
||||
$table->string('advimg_pc')->default('');
|
||||
$table->string('advurl_pc', 500)->default('');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_category');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzBrandTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_brand')) {
|
||||
Schema::create('yz_brand', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->string('name', 50)->nullable()->default('')->index('idx_name')->comment('品牌名称');
|
||||
$table->string('alias', 50)->nullable()->default('')->comment('品牌别名');
|
||||
$table->string('logo')->nullable()->default('')->comment('品牌logo');
|
||||
$table->string('desc')->nullable()->default('')->comment('品牌描述信息');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix()
|
||||
. "yz_brand` comment '品牌信息表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_brand');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzCommentTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_comment')) {
|
||||
Schema::create('yz_comment', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->default(0)->index('idx_uniacid');
|
||||
$table->integer('order_id')->nullable()->default(0)->index('idx_orderid');
|
||||
$table->integer('goods_id')->default(0)->index('idx_goodsid');
|
||||
$table->integer('uid')->nullable()->default(0)->index('idx_openid');
|
||||
$table->string('nick_name', 50)->nullable()->default('');
|
||||
$table->string('head_img_url')->nullable()->default('');
|
||||
$table->string('content')->default('');
|
||||
$table->boolean('level')->nullable()->default(0);
|
||||
$table->text('images', 65535)->nullable();
|
||||
$table->boolean('deleted')->nullable()->default(0);
|
||||
$table->integer('comment_id')->nullable()->default(0);
|
||||
$table->integer('reply_id')->nullable()->default(0);
|
||||
$table->string('reply_name', 50)->nullable();
|
||||
$table->integer('created_at')->default(0)->index('idx_createtime');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_comment comment '商品评论表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_comment');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsNoticesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_notices')) {
|
||||
Schema::create('yz_goods_notices', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('goods_id')->index('idx_good_id');
|
||||
$table->integer('uid')->nullable();
|
||||
$table->boolean('type')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_notices');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberUniqueTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_unique')) {
|
||||
Schema::create('yz_member_unique', function (Blueprint $table) {
|
||||
$table->integer('unique_id', true);
|
||||
$table->integer('uniacid')->nullable()->index('idx_uniacid')->comment('公众号');
|
||||
$table->string('unionid', 64)->unique('idx_unionid')->comment('开放平台唯一标识');
|
||||
$table->integer('member_id')->index('idx_member_id')->comment('会员id');
|
||||
$table->string('type')->nullable()->comment('登陆类型');
|
||||
$table->integer('created_at')->unsigned()->default(0);
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_unique` comment '会员--开放平台同步辅助表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_unique');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsShareTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_share')) {
|
||||
Schema::create('yz_goods_share', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('goods_id')->index('idx_goodid');
|
||||
$table->boolean('need_follow')->nullable()->comment('强制关注,1为开启,0为关闭');
|
||||
$table->string('no_follow_message')->nullable()->default('')->comment('未关注提示信息');
|
||||
$table->string('follow_message')->nullable()->default('')->comment('关注引导信息');
|
||||
$table->string('share_title', 50)->nullable()->default('')->comment('分享标题');
|
||||
$table->string('share_thumb')->nullable()->default('')->comment('分享图片');
|
||||
$table->string('share_desc')->nullable()->default('')->comment('分享描述');
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at');
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_goods_share comment '商品分享关注设置表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_share');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsDiscountTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_discount')) {
|
||||
Schema::create('yz_goods_discount', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('goods_id')->index('idx_goodid')->comment('商品ID');
|
||||
$table->boolean('level_discount_type')->comment('折扣类型1为会员等级');
|
||||
$table->boolean('discount_method')->comment('折扣方式,1折扣,2固定金额,3成本比例');
|
||||
$table->integer('level_id')->comment('会员等级ID');
|
||||
$table->decimal('discount_value', 3)->comment('折扣数值');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_goods_discount comment '商品折扣方式表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_discount');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsDispatchTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_dispatch')) {
|
||||
Schema::create('yz_goods_dispatch', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('goods_id')->index('idx_good_id');
|
||||
$table->boolean('dispatch_type')->default(1);
|
||||
$table->integer('dispatch_price')->nullable()->default(0);
|
||||
$table->integer('dispatch_id')->nullable();
|
||||
$table->boolean('is_cod')->default(1);
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_dispatch');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzDispatchTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_dispatch')) {
|
||||
Schema::create('yz_dispatch', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->nullable();
|
||||
$table->string('dispatch_name', 50)->nullable()->comment('配送模板名称');
|
||||
$table->integer('display_order')->nullable()->comment('排序');
|
||||
$table->boolean('enabled')->nullable()->comment('是否显示(1:是;0:否)');
|
||||
$table->boolean('is_default')->nullable()->comment('是否默认模板(1:是;0:否)');
|
||||
$table->boolean('calculate_type')->nullable()->comment('计费方式');
|
||||
$table->text('areas', 65535)->nullable()->comment('配送区域');
|
||||
$table->integer('first_weight')->nullable()->comment('首重克数');
|
||||
$table->integer('another_weight')->nullable()->comment('续重克数');
|
||||
$table->decimal('first_weight_price', 14)->nullable()->comment('首重价格');
|
||||
$table->decimal('another_weight_price', 14)->nullable()->comment('续重价格');
|
||||
$table->integer('first_piece')->nullable()->comment('首件个数');
|
||||
$table->integer('another_piece')->nullable()->comment('续件个数');
|
||||
$table->integer('first_piece_price')->nullable()->comment('首件价格');
|
||||
$table->integer('another_piece_price')->nullable()->comment('续件价格');
|
||||
$table->text('weight_data')->nullable()->comment('按重量计费数据');
|
||||
$table->text('piece_data')->nullable()->comment('按数量计费数据');
|
||||
$table->boolean('is_plugin')->nullable()->default(0);
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_dispatch comment '配送模板表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_dispatch');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use \Illuminate\Support\Facades\DB;
|
||||
|
||||
class CreateImsYzAddressTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_address')) {
|
||||
Schema::create('yz_address', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('areaname')->nullable();
|
||||
$table->integer('parentid')->nullable();
|
||||
$table->integer('level')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
if (Schema::hasTable('yz_address')) {
|
||||
|
||||
$address_file = base_path() .DIRECTORY_SEPARATOR.'static'.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'address.json';
|
||||
\Log::debug('--地址文件路径--'.$address_file);
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
\app\common\models\Address::truncate();
|
||||
$address_list = array_chunk(json_decode(file_get_contents($address_file), true), 2000);
|
||||
foreach ($address_list as $address) {
|
||||
\app\common\models\Address::insert($address);
|
||||
}
|
||||
|
||||
(new \app\common\services\address\GenerateAddressJs())->address();
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug('--地址生成错误--', $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_address');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use \Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class CreateImsYzStreetTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_street')) {
|
||||
Schema::create('yz_street', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('areaname')->nullable();
|
||||
$table->integer('parentid')->nullable();
|
||||
$table->integer('level')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (Schema::hasTable('yz_street')) {
|
||||
$street_file = base_path() . DIRECTORY_SEPARATOR . 'static'.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'street.json';
|
||||
\Log::debug('--街道地址文件路径--'.$street_file);
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
\app\common\models\Street::truncate();
|
||||
$street_list = array_chunk(json_decode(file_get_contents($street_file), true), 2000);
|
||||
foreach ($street_list as $street) {
|
||||
\app\common\models\Street::insert($street);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug('--街道地址生成错误--', $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_street');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPermissionTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_permission')) {
|
||||
Schema::create('yz_permission', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->boolean('type');
|
||||
$table->integer('item_id')->comment('操作员id');
|
||||
$table->string('permission')->comment('可操作权限');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_permission comment '商城--操作员权限表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_permission');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzRoleTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_role')) {
|
||||
Schema::create('yz_role', function (Blueprint $table) {
|
||||
$table->integer('id')->unsigned()->primary();
|
||||
$table->integer('uniacid');
|
||||
$table->string('name', 45)->comment('角色名称');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
$table->boolean('status')->default(0)->comment('1关闭,2开启');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_role comment '商城--角色表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_role');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzUserRoleTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_user_role')) {
|
||||
Schema::create('yz_user_role', function (Blueprint $table) {
|
||||
$table->integer('user_id')->comment('操作员id');
|
||||
$table->integer('role_id')->comment('角色id');
|
||||
$table->primary(['user_id', 'role_id']);
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_user_role comment '商城--角色与操作员中间表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_user_role');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsCategoryTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_category')) {
|
||||
Schema::create('yz_goods_category', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('goods_id')->nullable();
|
||||
$table->integer('category_id')->nullable()->comment('分类ID');
|
||||
$table->string('category_ids')->nullable()->comment('层级分类ID');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
|
||||
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_goods_category` comment'商品--分类关联'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_category');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzSettingTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_setting')) {
|
||||
Schema::create('yz_setting', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid');
|
||||
$table->string('group')->default('shop');
|
||||
$table->string('key');
|
||||
$table->string('type');
|
||||
$table->text('value', 65535);
|
||||
$table->unique(['group', 'key'], 'un_group_key');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_setting');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberRelationTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_relation')) {
|
||||
Schema::create('yz_member_relation', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->comment('公众号');
|
||||
$table->boolean('status')->default(0)->comment('是否启用关系链 0-关闭;1-开启');
|
||||
$table->boolean('become')->default(0)->comment('成为分销商条件 0-无条件;1-申请;2-消费x次;3-消费x元;4-购买商品');
|
||||
$table->boolean('become_order')->default(0)->comment('消费条件统计的方式 0-付款后;1-完成后');
|
||||
$table->boolean('become_child')->default(0)->comment('成为下线条件 0-分享链接;1-首次下单;2-首次付款');
|
||||
$table->integer('become_ordercount')->nullable()->default(0)->comment(' 消费x次');
|
||||
$table->decimal('become_moneycount', 14,2)->nullable()->default(0.00)->comment('消费x元');
|
||||
$table->integer('become_goods_id')->nullable()->default(0)->comment('购买的商品');
|
||||
$table->boolean('become_info')->default(1)->comment('完善信息 0-不需要;1-需要');
|
||||
$table->boolean('become_check')->default(1)->comment('成为分销商是否需要审核 0-不需要;1-需要');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_relation` comment '会员--关系设置表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_relation');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsSaleTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::create('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('goods_id')->index('idx_good_id');
|
||||
$table->string('max_point_deduct', 255)->nullable();
|
||||
$table->integer('max_balance_deduct')->nullable()->default(0);
|
||||
$table->integer('is_sendfree')->nullable()->default(0);
|
||||
$table->integer('ed_num')->nullable()->default(0);
|
||||
$table->integer('ed_money')->nullable();
|
||||
$table->text('ed_areas', 65535)->nullable();
|
||||
$table->string('point', 255)->nullable();
|
||||
$table->integer('bonus')->nullable()->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_sale');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsOptionTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_option')) {
|
||||
Schema::create('yz_goods_option', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->integer('goods_id')->nullable()->default(0)->index('idx_goodsid');
|
||||
$table->string('title', 50)->nullable();
|
||||
$table->string('thumb', 60)->nullable();
|
||||
$table->integer('product_price')->nullable()->default(0);
|
||||
$table->integer('market_price')->nullable()->default(0);
|
||||
$table->integer('cost_price')->nullable()->default(0);
|
||||
$table->integer('stock')->nullable()->default(0);
|
||||
$table->decimal('weight', 10)->nullable()->default(0.00);
|
||||
$table->integer('display_order')->nullable()->default(0)->index('idx_displayorder');
|
||||
$table->text('specs', 65535)->nullable();
|
||||
$table->string('skuId')->nullable()->default('');
|
||||
$table->string('goods_sn')->nullable()->default('');
|
||||
$table->string('product_sn')->nullable()->default('');
|
||||
$table->integer('virtual')->nullable()->default(0);
|
||||
$table->string('red_price', 50)->nullable()->default('');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_option');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzSmsSendLimitTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_sms_send_limit')) {
|
||||
Schema::create('yz_sms_send_limit', function (Blueprint $table) {
|
||||
$table->integer('sms_id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->string('mobile', 11)->comment('短信接受电话');
|
||||
$table->boolean('total')->comment('短信条数');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()
|
||||
."yz_sms_send_limit` comment '短信--短信发送限制表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_sms_send_limit');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMenuTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_menu')) {
|
||||
Schema::create('yz_menu', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name', 45)->comment('菜单名字');
|
||||
$table->string('item', 45)->comment('菜单标识');
|
||||
$table->string('url')->default('')->comment('菜单url');
|
||||
$table->string('url_params')->default('')->comment('菜单url参数');
|
||||
$table->boolean('permit')->default(0)->comment('权限控制');
|
||||
$table->boolean('menu')->default(0)->comment('菜单显示');
|
||||
$table->string('icon', 45)->default('')->comment('菜单图标');
|
||||
$table->integer('parent_id')->default(0)->comment('父级菜单ID');
|
||||
$table->integer('sort')->default(0)->comment('菜单排序');
|
||||
$table->boolean('status')->default(0)->comment('菜单状态1开启,0未开启');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_menu comment '菜单表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_menu');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzGoodsPrivilegeTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_goods_privilege')) {
|
||||
Schema::create('yz_goods_privilege', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('goods_id')->index('idx_goodid');
|
||||
$table->text('show_levels', 65535)->nullable();
|
||||
$table->text('show_groups', 65535)->nullable();
|
||||
$table->text('buy_levels', 65535)->nullable();
|
||||
$table->text('buy_groups', 65535)->nullable();
|
||||
$table->integer('once_buy_limit')->nullable()->default(0);
|
||||
$table->integer('total_buy_limit')->nullable()->default(0);
|
||||
$table->integer('time_begin_limit')->nullable();
|
||||
$table->integer('time_end_limit')->nullable();
|
||||
$table->boolean('enable_time_limit');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_goods_privilege');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzDispatchTypeTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_dispatch_type')) {
|
||||
Schema::create('yz_dispatch_type', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->default('');
|
||||
$table->integer('plugin');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_dispatch_type comment '配送类型表'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_dispatch_type');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderExpressTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order_express')) {
|
||||
Schema::create('yz_order_express', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('order_id')->default(0)->index('idx_order_id');
|
||||
$table->string('express_company_name', 50)->default('');
|
||||
$table->string('express_sn', 50)->default('');
|
||||
$table->string('express_code', 20)->default('');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_order_express` comment'订单--快递记录'");//表注释
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order_express');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderRemarkTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order_remark')) {
|
||||
Schema::create('yz_order_remark', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('order_id')->index('idx_order_id');
|
||||
$table->char('remark');
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('deleted_at')->default(0);
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_order_remark` comment'订单--商家注释'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order_remark');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order')) {
|
||||
Schema::create('yz_order', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->unsigned()->default(0);
|
||||
$table->integer('uid')->default(0);
|
||||
$table->string('order_sn', 23)->default('');
|
||||
$table->integer('price')->default(0);
|
||||
$table->integer('goods_price')->default(0);
|
||||
$table->boolean('status')->default(0);
|
||||
$table->integer('create_time')->default(0);
|
||||
$table->boolean('is_deleted')->default(0);
|
||||
$table->boolean('is_member_deleted')->default(0);
|
||||
$table->text('change_price_detail', 65535)->nullable();
|
||||
$table->integer('finish_time')->default(0);
|
||||
$table->integer('pay_time')->default(0);
|
||||
$table->integer('send_time')->default(0);
|
||||
$table->integer('cancel_time')->default(0);
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->default(0);
|
||||
$table->integer('cancel_pay_time')->default(0);
|
||||
$table->integer('cancel_send_time')->default(0);
|
||||
$table->integer('dispatch_type_id')->default(0);
|
||||
$table->integer('pay_type_id')->default(0);
|
||||
$table->integer('is_plugin')->unsigned()->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderGoodsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order_goods')) {
|
||||
Schema::create('yz_order_goods', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->default(0);
|
||||
$table->integer('order_id')->default(0)->comment('订单ID');
|
||||
$table->integer('goods_id')->default(0)->comment('商品id');
|
||||
$table->integer('total')->default(1)->comment('购买数量');
|
||||
$table->integer('create_at')->default(0);
|
||||
$table->integer('price')->default(0)->comment('订单金额计算基数');
|
||||
$table->string('goods_sn', 50)->default('')->comment('商品码');
|
||||
$table->string('thumb', 50)->comment('商品图片');
|
||||
$table->string('title', 50)->comment('商品名称');
|
||||
$table->integer('goods_price')->default(0)->comment('商品现价');
|
||||
$table->integer('goods_option_id')->comment('规格ID');
|
||||
$table->string('goods_option_title',255)->default('')->comment('规格名称');
|
||||
$table->integer('product_sn')->comment('商品条码');
|
||||
});
|
||||
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_order_goods` comment'订单--商品记录'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order_goods');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayTypeTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_type')) {
|
||||
Schema::create('yz_pay_type', function (Blueprint $table) {
|
||||
$table->increments('id')->comment('支付类型ID');
|
||||
$table->string('name', 50)->default('')->comment('支付类型名称');
|
||||
$table->integer('plugin_id');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_pay_type` comment'系统--支付类型'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_type');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOptionsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_options')) {
|
||||
Schema::create('yz_options', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('option_name', 45)->nullable()->comment('插件名称');
|
||||
$table->text('option_value')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_options comment '插件开启记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_options');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderOperationLogTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order_operation_log')) {
|
||||
Schema::create('yz_order_operation_log', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->nullable()->default(0)->comment('订单ID');
|
||||
$table->boolean('before_operation_status')->nullable()->default(0)->comment('操作前状态');
|
||||
$table->boolean('after_operation_status')->nullable()->default(0)->comment('操作后状态');
|
||||
$table->string('operator', 50)->nullable()->default('')->comment('操作员');
|
||||
$table->integer('operation_time')->nullable()->default(0)->comment('操作时间');
|
||||
$table->integer('created_at')->nullable()->default(0);
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->string('type', 10)->nullable()->default('0');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_order_operation_log` comment'订单--状态操作记录'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order_operation_log');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderMappingTable extends Migration {
|
||||
|
||||
/**
|
||||
* 在订单数据迁移时, 记录新旧order_id的对应关系
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order_mapping')) {
|
||||
Schema::create('yz_order_mapping', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('old_order_id')->comment('旧订单ID');
|
||||
$table->integer('new_order_id')->comment('新订单ID');
|
||||
$table->char('old_openid', 50);
|
||||
$table->integer('new_member_id')->comment('新会员ID');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_order_mapping comment '会员--会员重构订单变化记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order_mapping');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzTemplateMessageRecordTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_template_message_record')) {
|
||||
Schema::create('yz_template_message_record', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable();
|
||||
$table->string('member_id', 20);
|
||||
$table->char('openid', 32)->default('');
|
||||
$table->string('template_id', 45);
|
||||
$table->string('url')->default('');
|
||||
$table->char('top_color', 7)->default('');
|
||||
$table->text('data', 65535);
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('send_time')->default(0);
|
||||
$table->boolean('status')->default(0);
|
||||
$table->string('msgid', 20)->nullable()->default('');
|
||||
$table->boolean('result')->default(0);
|
||||
$table->integer('wechat_send_at')->default(0);
|
||||
$table->boolean('sended_count')->default(1);
|
||||
$table->text('extend_data', 65535)->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_template_message_record');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzTemplateMessageTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_template_message')) {
|
||||
Schema::create('yz_template_message', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('type', 20)->nullable()->default('system');
|
||||
$table->string('item', 45);
|
||||
$table->string('parent_item', 45)->default('');
|
||||
$table->string('title', 45);
|
||||
$table->string('template_id_short', 45);
|
||||
$table->string('template_id', 45);
|
||||
$table->string('content');
|
||||
$table->string('example');
|
||||
$table->boolean('status')->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_template_message');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayAccessLogTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_access_log')) {
|
||||
Schema::create('yz_pay_access_log', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->integer('member_id');
|
||||
$table->text('url', 65535);
|
||||
$table->char('http_method', 7);
|
||||
$table->string('ip', 135);
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->nullable()->default(0);
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_pay_access_log comment '支付--支付通道记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_access_log');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayLogTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_log')) {
|
||||
Schema::create('yz_pay_log', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->integer('member_id');
|
||||
$table->tinyInteger('type')->comment('支付操作类型');
|
||||
$table->string('third_type', 255)->comment('支付方式');
|
||||
$table->decimal('price', 14, 2)->comment('支付金额');
|
||||
$table->text('operation', 65535)->comment('支付操作详情');
|
||||
$table->string('ip', 135);
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->nullable()->default(0);
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_pay_log comment '支付--支付记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_log');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayRefundOrderTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_refund_order')) {
|
||||
Schema::create('yz_pay_refund_order', function (Blueprint $table) {
|
||||
$table->integer('id')->primary();
|
||||
$table->integer('uniacid');
|
||||
$table->integer('member_id');
|
||||
$table->string('int_order_no', 32)->comment('支付单号');
|
||||
$table->string('out_order_no', 32)->comment('订单单号');
|
||||
$table->string('trade_no', 255)->comment('支付批次号');
|
||||
$table->decimal('price', 14,2)->comment('金额');
|
||||
$table->string('type', 255)->comment('支付操作类型');
|
||||
$table->tinyInteger('status')->comment('状态');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_pay_refund_order comment '支付--退款记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_refund_order');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayRequestDataTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_request_data')) {
|
||||
Schema::create('yz_pay_request_data', function (Blueprint $table) {
|
||||
$table->integer('id')->primary();
|
||||
$table->integer('uniacid');
|
||||
$table->string('out_order_no', 255)->comment('支付单号');
|
||||
$table->string('type', 255)->comment('支付操作类型');
|
||||
$table->string('third_type', 255)->nullable()->comment('支付方式');
|
||||
$table->text('params', 65535)->comment('请求参数');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_pay_request_data comment '支付--支付请求参数记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_request_data');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayResponseDataTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_response_data')) {
|
||||
Schema::create('yz_pay_response_data', function (Blueprint $table) {
|
||||
$table->integer('id')->primary();
|
||||
$table->integer('uniacid');
|
||||
$table->string('out_order_no', 255)->comment('支付单号');
|
||||
$table->string('third_type', 255)->comment('支付方式');
|
||||
$table->text('params', 65535)->comment('响应参数');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_pay_response_data comment '支付--订单支付请求响应参数记录(一般为微信支付宝支付等)'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_response_data');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzPayOrderTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_order')) {
|
||||
Schema::create('yz_pay_order', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->index('idx_uniacid');
|
||||
$table->integer('member_id')->index('idx_member_id');
|
||||
$table->string('int_order_no', 32)->nullable();
|
||||
$table->string('out_order_no', 32)->default('0')->index('idx_order_no');
|
||||
$table->string('trade_no', 255)->nullable();
|
||||
$table->tinyInteger('status')->default(0);
|
||||
$table->decimal('price', 14, 2);
|
||||
$table->tinyInteger('type');
|
||||
$table->string('third_type', 255);
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_order');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberIncomeTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_income')) {
|
||||
Schema::create('yz_member_income', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->comment('所属公众号');
|
||||
$table->integer('member_id')->comment('会员id');
|
||||
$table->string('type', 60)->default('');
|
||||
$table->integer('type_id')->nullable();
|
||||
$table->string('type_name', 120)->nullable()->comment('类型名字');
|
||||
$table->decimal('amount', 14)->default(0.00)->comment('金额');
|
||||
$table->boolean('status')->default(0)->comment('是否提现');
|
||||
$table->text('detail', 65535)->nullable()->comment('详情');
|
||||
$table->string('create_month', 20)->nullable()->default('创建月份');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix() . "yz_member_income` comment '会员--收入表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_income');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzWithdrawTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_withdraw')) {
|
||||
Schema::create('yz_withdraw', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->nullable();
|
||||
$table->integer('member_id')->nullable()->comment('会员id');
|
||||
$table->string('type', 60)->nullable()->comment('收入模型');
|
||||
$table->string('type_id', 60)->nullable()->comment('收入id');
|
||||
$table->decimal('amounts', 14)->nullable()->comment('审核金额');
|
||||
$table->decimal('poundage', 14)->nullable()->comment('手续费');
|
||||
$table->decimal('poundage_rate')->nullable()->comment('手续费比例');
|
||||
$table->string('pay_way', 100)->nullable()->comment('提现类型');
|
||||
$table->boolean('status')->nullable()->comment('审核状态');
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_withdraw comment '财务--提现表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_withdraw');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzBalanceRechargeTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_balance_recharge')) {
|
||||
Schema::create('yz_balance_recharge', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable();
|
||||
$table->integer('member_id')->nullable()->comment('充值会员ID');;
|
||||
$table->decimal('old_money', 14)->nullable()->comment('修改前额度');;
|
||||
$table->decimal('money', 14)->nullable()->comment('修改额度');;
|
||||
$table->decimal('new_money', 14)->nullable()->comment('修改后额度');;
|
||||
$table->integer('type')->nullable()->comment('充值类型');;
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->string('ordersn', 50)->nullable()->comment('充值订单号');;
|
||||
$table->boolean('status')->nullable()->default(0)->comment('状态');;
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix()
|
||||
. "yz_balance_recharge` comment '财务--余额充值表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_balance_recharge');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzBalanceTransferTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_balance_transfer')) {
|
||||
Schema::create('yz_balance_transfer', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable();
|
||||
$table->integer('transferor')->nullable();
|
||||
$table->integer('recipient')->nullable();
|
||||
$table->decimal('money', 14)->nullable();
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->boolean('status')->nullable();
|
||||
$table->integer('updated_at');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix()
|
||||
. "yz_balance_transfer` comment '财务--余额转让表'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_balance_transfer');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzBalanceTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_balance')) {
|
||||
Schema::create('yz_balance', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable();
|
||||
$table->integer('member_id')->nullable()->comment('会员id');
|
||||
$table->decimal('old_money', 14)->nullable()->comment('修改前额度');
|
||||
$table->decimal('change_money', 14)->comment('修改额度');
|
||||
$table->decimal('new_money', 14)->comment('修改后额度');
|
||||
$table->boolean('type')->comment('变动类型,1收入,2支出');
|
||||
$table->boolean('service_type');
|
||||
$table->string('serial_number', 45)->default('')->comment('订单编号');
|
||||
$table->integer('operator')->comment('操作类型');
|
||||
$table->string('operator_id', 45)->default('')->comment('操作者id');
|
||||
$table->string('remark', 200)->default('')->comment('余额变更备注');
|
||||
$table->integer('created_at');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_balance comment '财务--余额变更记录表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_balance');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderAddressTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_order_address')) {
|
||||
Schema::table('yz_order_address', function (Blueprint $table) {
|
||||
|
||||
if (!Schema::hasColumn('yz_order_address', 'province_id')) {
|
||||
|
||||
$table->integer('province_id')->default(0)->comment('省id');
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('yz_order_address', 'city_id')) {
|
||||
|
||||
$table->integer('city_id')->default(0)->comment('市id');
|
||||
}
|
||||
if (!Schema::hasColumn('yz_order_address', 'district_id')) {
|
||||
|
||||
$table->integer('district_id')->default(0)->comment('区id');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_order_address')) {
|
||||
Schema::table('yz_order_address', function (Blueprint $table) {
|
||||
$table->dropColumn('province_id');
|
||||
$table->dropColumn('city_id');
|
||||
$table->dropColumn('district_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddEdAreaidsToGoodsSaleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_goods_sale', 'ed_areaids')) {
|
||||
$table->text('ed_areaids')->nullable()->after('ed_areas');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->dropColumn('ed_areaids');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzCouponLogTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_coupon_log')) {
|
||||
Schema::create('yz_coupon_log', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->string('logno')->nullable()->default('')->comment('日志详情');
|
||||
$table->string('member_id')->nullable()->default('')->comment('会员id');
|
||||
$table->integer('couponid')->nullable()->default(0)->index('idx_couponid')->comment('优惠券id');
|
||||
$table->boolean('paystatus')->nullable()->default(0)->index('idx_paystatus')->comment('支付状态');
|
||||
$table->boolean('creditstatus')->nullable()->default(0);
|
||||
$table->boolean('paytype')->nullable()->default(0)->comment('支付方式');
|
||||
$table->boolean('getfrom')->nullable()->default(0)->index('idx_getfrom')->comment('获取途径');
|
||||
$table->integer('status')->nullable()->default(0)->index('idx_status')->comment('状态');
|
||||
$table->integer('createtime')->nullable()->default(0)->index('idx_createtime')->comment(' 创建时间');
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_coupon_log comment '优惠券--领取发放记录'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_coupon_log');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzCouponTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_coupon')) {
|
||||
Schema::create('yz_coupon', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->integer('cat_id')->nullable()->default(0)->comment('分类ID');
|
||||
$table->string('name')->nullable()->default('')->comment('优惠券名称');
|
||||
$table->boolean('get_type')->nullable()->default(0)->comment('获取优惠券的方式');
|
||||
$table->integer('level_limit')->nullable()->comment('领取条件 - 会员等级');
|
||||
$table->integer('get_max')->nullable()->default(0)->comment('每个人的限领数量');
|
||||
$table->boolean('use_type')->nullable()->default(0)->comment('使用方式');
|
||||
$table->string('bgcolor')->nullable()->default('')->comment('背景颜色');
|
||||
$table->integer('enough')->unsigned()->nullable()->default(0)->comment('使用条件(消费金额前提)');
|
||||
$table->boolean('coupon_type')->nullable()->default(0)->comment('优惠券类型');
|
||||
$table->boolean('time_limit')->nullable()->default(0)->comment('使用时间限制');
|
||||
$table->integer('time_days')->nullable()->default(0)->comment('使用时间限制');
|
||||
$table->integer('time_start')->nullable()->default(0)->comment('起始使用时间');
|
||||
$table->integer('time_end')->nullable()->default(0)->comment('截止使用时间');
|
||||
$table->boolean('coupon_method')->nullable()->comment('优惠方式');
|
||||
$table->decimal('deduct', 10)->nullable()->default(0.00)->comment('优惠立减');
|
||||
$table->decimal('discount', 10)->nullable()->default(0.00)->comment('优惠打折');
|
||||
$table->string('thumb')->nullable()->default('')->comment('缩略图');
|
||||
$table->text('desc', 65535)->nullable()->comment('描述说明');
|
||||
$table->integer('total')->nullable()->default(0)->comment('优惠券发放总数');
|
||||
$table->boolean('status')->nullable()->default(0)->comment('是否启用');
|
||||
$table->text('resp_desc', 65535)->nullable()->comment('推送说明');
|
||||
$table->string('resp_thumb')->nullable()->default('')->comment('推送缩略图');
|
||||
$table->string('resp_title')->nullable()->default('')->comment('推送标题');
|
||||
$table->string('resp_url')->nullable()->default('')->comment('推送链接');
|
||||
$table->string('remark', 1000)->nullable()->default('')->comment('备注');
|
||||
$table->integer('display_order')->nullable()->default(0)->comment('排序');
|
||||
$table->integer('supplier_uid')->nullable()->default(0)->comment('供应商uid');
|
||||
$table->text('cashiersids', 65535)->nullable()->comment('收银台id');
|
||||
$table->text('cashiersnames', 65535)->nullable()->comment('收银台名称');
|
||||
$table->text('category_ids', 65535)->nullable()->comment('分类id');
|
||||
$table->text('categorynames', 65535)->nullable()->comment('分类名称');
|
||||
$table->text('goods_names', 65535)->nullable()->comment('商品名称');
|
||||
$table->text('goods_ids', 65535)->nullable()->comment('商品id');
|
||||
$table->text('supplierids', 65535)->nullable()->comment('供应商ids');
|
||||
$table->text('suppliernames', 65535)->nullable()->comment('供应商名称');
|
||||
$table->integer('createtime')->nullable()->default(0);
|
||||
$table->integer('created_at')->unsigned()->nullable();
|
||||
$table->integer('updated_at')->unsigned()->nullable();
|
||||
$table->integer('deleted_at')->unsigned()->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_coupon comment '优惠券--优惠券表'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_coupon');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzMemberCouponTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_member_coupon')) {
|
||||
Schema::create('yz_member_coupon', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid')->nullable()->default(0)->index('idx_uniacid');
|
||||
$table->string('uid')->nullable()->default('')->comment('会员id');
|
||||
$table->integer('coupon_id')->nullable()->default(0)->index('idx_couponid')->comment('优惠券id');
|
||||
$table->boolean('get_type')->nullable()->default(0)->index('idx_gettype')->comment('获取优惠券的方式');
|
||||
$table->integer('used')->nullable()->default(0)->comment('是否已经使用');
|
||||
$table->integer('use_time')->nullable()->default(0)->comment('使用优惠券的时间');
|
||||
$table->integer('get_time')->nullable()->default(0)->comment('获取优惠券的时间');
|
||||
$table->integer('send_uid')->nullable()->default(0)->comment('手动发放优惠券的操作人员的 uid');
|
||||
$table->string('order_sn')->nullable()->default('')->comment('使用优惠券的订单号');
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_member_coupon comment '优惠券--会员优惠券'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_member_coupon');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDeletedAtToImsYzMemberCoupon extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_member_coupon')) {
|
||||
Schema::table('yz_member_coupon', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_member_coupon', 'deleted_at')) {
|
||||
$table->integer('deleted_at')->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_member_coupon')) {
|
||||
Schema::table('yz_member_coupon', function (Blueprint $table) {
|
||||
$table->dropColumn('deleted_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLevelLimitToImsYzCoupon extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_coupon')) {
|
||||
Schema::table('yz_coupon', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_coupon', 'level_limit')) {
|
||||
$table->integer('level_limit')->nullable()->after('get_type')->comment('领取条件 - 会员等级');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('yz_coupon', function (Blueprint $table) {
|
||||
$table->dropColumn('level_limit');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzOrderPayTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_order_pay')) {
|
||||
Schema::create('yz_order_pay', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('pay_sn', 23)->default('')->comment('支付流水号');
|
||||
$table->boolean('status')->default(0)->comment('状态');
|
||||
$table->boolean('pay_type_id')->default(0)->comment('支付类型ID');
|
||||
$table->integer('pay_time')->default(0)->comment('支付时间');
|
||||
$table->integer('refund_time')->default(0);
|
||||
$table->string('order_ids', 500)->default('')->comment('合并支付订单ID数组');
|
||||
$table->decimal('amount', 10)->default(0.00)->comment('支付金额');
|
||||
$table->integer('uid');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->integer('created_at')->nullable();
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_order_pay` comment'订单--支付流水记录'");//表注释
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_order_pay');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddCommentAddType extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_comment')) {
|
||||
Schema::table('yz_comment', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_comment', 'type')) {
|
||||
$table->tinyInteger('type')->default(3);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_comment')) {
|
||||
Schema::table('yz_comment', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('yz_comment', 'type')) {
|
||||
$table->dropColumn('type');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateImsYzPayWithdrawOrderTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_pay_withdraw_order')) {
|
||||
Schema::create('yz_pay_withdraw_order', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uniacid');
|
||||
$table->integer('member_id');
|
||||
$table->string('int_order_no', 32);
|
||||
$table->string('out_order_no', 32);
|
||||
$table->string('trade_no', 255)->nullable();
|
||||
$table->decimal('price', 14, 2);
|
||||
$table->string('type', 255);
|
||||
$table->integer('status');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_pay_withdraw_order');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DeleteMaxPointDeductToImsYzGoodsSaleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('yz_goods_sale', 'max_point_deduct')) {
|
||||
$table->dropColumn('max_point_deduct');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddMaxPointDeductToImsYzGoodsSaleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->string('max_point_deduct', 255)->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->dropColumn('max_point_deduct');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DeletePointToImsYzGoodsSaleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('yz_goods_sale', 'point')) {
|
||||
$table->dropColumn('point');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddPointToImsYzGoodsSaleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->string('point', 255)->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->dropColumn('point');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDeledeAtToImsYzMemberTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_member')) {
|
||||
Schema::table('yz_member', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_member', 'relation')) {
|
||||
$table->string('relation', 255)->nullable();
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('yz_member', 'created_at')) {
|
||||
$table->integer('created_at')->default(0);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('yz_member', 'updated_at')) {
|
||||
$table->integer('updated_at')->default(0);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('yz_member', 'deleted_at')) {
|
||||
$table->integer('deleted_at')->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_member')) {
|
||||
Schema::table('yz_member', function (Blueprint $table) {
|
||||
$table->dropColumn('relation');
|
||||
$table->dropColumn('created_at');
|
||||
$table->dropColumn('updated_at');
|
||||
$table->dropColumn('deleted_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddGoodsMarketPriceOrderGoodsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_order_goods')) {
|
||||
Schema::table('yz_order_goods', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_order_goods', 'goods_market_price')) {
|
||||
|
||||
$table->decimal('goods_market_price', 10)->default(0.00);
|
||||
}
|
||||
if (!Schema::hasColumn('yz_order_goods', 'goods_cost_price')) {
|
||||
|
||||
$table->decimal('goods_cost_price', 10)->default(0.00);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_order_goods')) {
|
||||
Schema::table('yz_order_goods', function (Blueprint $table) {
|
||||
$table->dropColumn('goods_market_price');
|
||||
$table->dropColumn('goods_cost_price');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddOrderPayIdToYzOrderTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_order')) {
|
||||
Schema::table('yz_order', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_order', 'order_pay_id')) {
|
||||
|
||||
$table->integer('order_pay_id')->default(0);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_order')) {
|
||||
Schema::table('yz_order', function (Blueprint $table) {
|
||||
$table->dropColumn('order_pay_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddUpdatedAtToImsYzMemberUniqueTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_member_unique')) {
|
||||
Schema::table('yz_member_unique', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_member_unique', 'updated_at')) {
|
||||
|
||||
$table->integer('updated_at')->default(0);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('yz_member_unique', 'deleted_at')) {
|
||||
|
||||
$table->integer('deleted_at')->nullable();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_member_unique')) {
|
||||
Schema::table('yz_member_unique', function (Blueprint $table) {
|
||||
$table->dropColumn('updated_at');
|
||||
$table->dropColumn('deleted_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddNoteToYzOrderAddressTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_order_address')) {
|
||||
Schema::table('yz_order_address', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_order_address', 'note')) {
|
||||
$table->text('note')->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_order_address')) {
|
||||
Schema::table('yz_order_address', function (Blueprint $table) {
|
||||
$table->dropColumn('note');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzReturnExpressTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_return_express')) {
|
||||
Schema::create('yz_return_express', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('refund_id')->default(0)->index('idx_order_id')->comment('售后表id');
|
||||
$table->string('express_company_name', 50)->default('0')->comment('物流公司名称');
|
||||
$table->string('express_sn', 50)->default('0')->comment('物流单号');
|
||||
$table->string('express_code', 20)->default('0')->comment('物流公司编码');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->nullable();
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_return_express comment '商城--售后客户发货物流'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_return_express');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzResendExpressTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_resend_express')) {
|
||||
Schema::create('yz_resend_express', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('refund_id')->default(0)->index('idx_order_id')->comment('售后表id');
|
||||
$table->string('express_company_name', 50)->default('0')->comment('物流公司名称');
|
||||
$table->string('express_sn', 50)->default('0')->comment('物流单号');
|
||||
$table->string('express_code', 20)->default('0')->comment('物流公司编码');
|
||||
$table->integer('created_at')->default(0);
|
||||
$table->integer('updated_at')->default(0);
|
||||
$table->integer('deleted_at')->default(0);
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
|
||||
. "yz_resend_express comment '商城--售后卖家发货物流'");//表注释
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('yz_resend_express');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,332 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use \app\common\models\Menu;
|
||||
|
||||
class AddDataImsYzMenu extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (\Schema::hasTable('yz_menu')) {
|
||||
|
||||
$_menu = Menu::where('url','finance.balance.balanceDetail')->update(['url'=>'finance.balance-records.index']);
|
||||
|
||||
$_menu = Menu::select('id')->where('item', 'goods.goods')->first();
|
||||
|
||||
if (!is_null($_menu)) {
|
||||
$modelOne = Menu::select('id')->where('item', 'goods.goods.edit')->first();
|
||||
if ($modelOne) {
|
||||
Menu::where('id', $modelOne->id)->update(['menu' => 0]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '编辑商品',
|
||||
'item' => 'goods.goods.edit',
|
||||
'url' => 'goods.goods.edit',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 0,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelTwo = Menu::select('id')->where('item', 'goods.goods.create')->first();
|
||||
if ($modelOne) {
|
||||
Menu::where('id', $modelTwo->id)->update(['menu' => 0]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '添加商品',
|
||||
'item' => 'goods.goods.create',
|
||||
'url' => 'goods.goods.create',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 0,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelThree = Menu::select('id')->where('item', 'goods.goods.destroy')->first();
|
||||
if ($modelOne) {
|
||||
Menu::where('id', $modelThree->id)->update(['menu' => 0]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '添加商品',
|
||||
'item' => 'goods.goods.destroy',
|
||||
'url' => 'goods.goods.destroy',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 0,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelFour = Menu::select('id')->where('item', 'goods.goods.copy')->first();
|
||||
if ($modelOne) {
|
||||
Menu::where('id', $modelFour->id)->update(['menu' => 0]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '添加商品',
|
||||
'item' => 'goods.goods.copy',
|
||||
'url' => 'goods.goods.copy',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 0,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/* $_menu = Menu::select('id')->where('url', 'order.list')->first();
|
||||
if ($_menu->id) {
|
||||
$modelOne = Menu::select('id')->where('url', 'refund.list.refund')->first();
|
||||
if ($modelOne) {
|
||||
Menu::where('id', $modelOne->id)->update([
|
||||
'name' => '退换货订单',
|
||||
'item' => 'refund_list_refund',
|
||||
'url' => 'refund.list.refund',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '退换货订单',
|
||||
'item' => 'refund_list_refund',
|
||||
'url' => 'refund.list.refund',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelTwo = Menu::select('id')->where('url', 'refund.list.refunded')->first();
|
||||
if ($modelTwo) {
|
||||
Menu::where('id', $modelTwo->id)->update([
|
||||
'name' => '已退款',
|
||||
'item' => 'refund_list_refunded',
|
||||
'url' => 'refund.list.refunded',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '已退款',
|
||||
'item' => 'refund_list_refunded',
|
||||
'url' => 'refund.list.refunded',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$_menu = Menu::select('id')->where('url', 'refund.list.refund')->first();
|
||||
if ($_menu->id) {
|
||||
$modelOne = Menu::select('id')->where('url', 'refund.list.refundMoney')->first();
|
||||
if ($modelOne) {
|
||||
Menu::where('id', $modelOne->id)->update([
|
||||
'name' => '仅退款',
|
||||
'item' => 'refund_list_refundMoney',
|
||||
'url' => 'refund.list.refundMoney',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '仅退款',
|
||||
'item' => 'refund_list_refundMoney',
|
||||
'url' => 'refund.list.refundMoney',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelTwo = Menu::select('id')->where('url', 'refund.list.returnGoods')->first();
|
||||
if ($modelTwo) {
|
||||
Menu::where('id', $modelTwo->id)->update([
|
||||
'name' => '退货退款',
|
||||
'item' => 'refund_list_returnGoods',
|
||||
'url' => 'refund.list.returnGoods',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '退货退款',
|
||||
'item' => 'refund_list_returnGoods',
|
||||
'url' => 'refund.list.returnGoods',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelThree = Menu::select('id')->where('url', 'refund.list.exchangeGoods')->first();
|
||||
if ($modelThree) {
|
||||
Menu::where('id', $modelThree->id)->update([
|
||||
'name' => '换货',
|
||||
'item' => 'refund_list_exchangeGoods',
|
||||
'url' => 'refund.list.exchangeGoods',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '换货',
|
||||
'item' => 'refund_list_exchangeGoods',
|
||||
'url' => 'refund.list.exchangeGoods',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
$modelFour = Menu::select('id')->where('url', 'refund.list.refund')->first();
|
||||
if ($modelFour) {
|
||||
Menu::where('id', $modelFour->id)->update([
|
||||
'name' => '全部',
|
||||
'item' => 'refund_list_refund_all',
|
||||
'url' => 'refund.list.refund',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
} else {
|
||||
Menu::insert([
|
||||
'name' => '全部',
|
||||
'item' => 'refund_list_refund_all',
|
||||
'url' => 'refund.list.refund',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'parent_id' => $_menu->id,
|
||||
'sort' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => NULL
|
||||
]);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDataToYzPayType extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (\Schema::hasTable('yz_pay_type')) {
|
||||
Schema::table('yz_pay_type', function (Blueprint $table) {
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'code')) {
|
||||
$table->string('code', 50);
|
||||
}
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'type')) {
|
||||
$table->tinyInteger('type');
|
||||
}
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'plugin_id')) {
|
||||
$table->tinyInteger('plugin_id');
|
||||
}
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'unit')) {
|
||||
$table->string('unit', 50);
|
||||
}
|
||||
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'updated_at')) {
|
||||
|
||||
$table->integer('updated_at')->nullable();
|
||||
}
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'created_at')) {
|
||||
|
||||
$table->integer('created_at')->nullable();
|
||||
}
|
||||
if (!\Schema::hasColumn('yz_pay_type', 'deleted_at')) {
|
||||
|
||||
$table->integer('deleted_at')->nullable();
|
||||
}
|
||||
|
||||
});
|
||||
\Illuminate\Support\Facades\DB::transaction(function () {
|
||||
$this->syncData();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private function syncData()
|
||||
{
|
||||
\app\common\models\PayType::where('id','>','-1')->delete();
|
||||
\app\common\models\PayType::insert([
|
||||
['name'=>'未支付', 'code'=>'unPay', 'type'=>0, 'plugin_id'=>0, 'unit'=>''],
|
||||
['name'=>'微信支付', 'code'=>'wechatPay', 'type'=>2, 'plugin_id'=>0, 'unit'=>'元'],
|
||||
['name'=>'支付宝支付', 'code'=>'alipay', 'type'=>2, 'plugin_id'=>0, 'unit'=>'元'],
|
||||
['name'=>'余额支付', 'code'=>'balance', 'type'=>1, 'plugin_id'=>0, 'unit'=>'元'],
|
||||
['name'=>'金币支付', 'code'=>'gold', 'type'=>1, 'plugin_id'=>0, 'unit'=>'金币']]
|
||||
);
|
||||
\app\common\models\PayType::where('code','unPay')->update(['id'=>0]);
|
||||
\app\common\models\PayType::where('code','wechatPay')->update(['id'=>1]);
|
||||
\app\common\models\PayType::where('code','alipay')->update(['id'=>2]);
|
||||
\app\common\models\PayType::where('code','balance')->update(['id'=>3]);
|
||||
\app\common\models\PayType::where('code','gold')->update(['id'=>4]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (\Schema::hasTable('yz_pay_type')) {
|
||||
Schema::table('yz_pay_type', function (Blueprint $table) {
|
||||
$table->dropColumn('code');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ChangeEnableTimeLimitToGoodsPrivilegeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (\Schema::hasTable('yz_goods_privilege')) {
|
||||
Schema::table('yz_goods_privilege', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('yz_goods_privilege', 'enable_time_limit')) {
|
||||
$table->dropColumn('enable_time_limit');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddEnableTimeLimitToGoodsPrivilegeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_privilege')) {
|
||||
if (!Schema::hasColumn('yz_goods_privilege', 'enable_time_limit')) {
|
||||
|
||||
Schema::table('yz_goods_privilege', function (Blueprint $table) {
|
||||
$table->tinyInteger('enable_time_limit')->nullable()->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_goods_privilege')) {
|
||||
if (Schema::hasColumn('yz_goods_privilege', 'enable_time_limit')) {
|
||||
|
||||
Schema::table('yz_goods_privilege', function (Blueprint $table) {
|
||||
$table->dropColumn('enable_time_limit');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddMenuDataToMenu extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?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()
|
||||
{
|
||||
if (!Schema::hasTable('jobs')) {
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
$table->longText('payload');
|
||||
$table->tinyInteger('attempts')->unsigned();
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
//$table->index(['queue', 'reserved_at'], 'index');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzExhelperExpressTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_exhelper_express')) {
|
||||
Schema::create('yz_exhelper_express', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->default(0);
|
||||
$table->boolean('type')->default(0);
|
||||
$table->string('expressname')->nullable()->default('');
|
||||
$table->string('expresscom')->nullable()->default('');
|
||||
$table->string('express')->nullable()->default('');
|
||||
$table->decimal('width', 10)->nullable()->default(0.00);
|
||||
$table->text('datas', 65535)->nullable();
|
||||
$table->decimal('height', 10)->nullable()->default(0.00);
|
||||
$table->string('bg')->nullable()->default('');
|
||||
$table->boolean('isdefault')->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ims_yz_exhelper_express');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzExhelperGoodsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_exhelper_goods')) {
|
||||
Schema::create('yz_exhelper_goods', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('goods_id')->default(0);
|
||||
$table->string('short_title', 100)->nullable()->default('');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ims_yz_exhelper_goods');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzExhelperOrderTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_exhelper_order')) {
|
||||
Schema::create('yz_exhelper_order', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('order_sn')->default('');
|
||||
$table->string('realname', 100)->nullable();
|
||||
$table->string('mobile', 50)->nullable();
|
||||
$table->string('address')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ims_yz_exhelper_order');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzExhelperPrintTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_exhelper_print')) {
|
||||
Schema::create('yz_exhelper_print', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->default(0);
|
||||
$table->boolean('express_print_status')->default(0);
|
||||
$table->boolean('send_print_status')->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ims_yz_exhelper_print');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateImsYzExhelperSysTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('yz_exhelper_sys')) {
|
||||
Schema::create('yz_exhelper_sys', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('uniacid')->nullable()->default(0);
|
||||
$table->string('ip', 20)->nullable()->default('');
|
||||
$table->integer('port')->nullable()->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ims_yz_exhelper_sys');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddOrderSnToBalanceTransfer extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('yz_balance_transfer')) {
|
||||
Schema::table('yz_balance_transfer', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_balance_transfer', 'order_sn')) {
|
||||
|
||||
$table->string('order_sn', 255)->nullable();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasTable('yz_balance_transfer')) {
|
||||
Schema::table('yz_balance_transfer', function (Blueprint $table) {
|
||||
$table->dropColumn('order_sn');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddEdFullToGoodsSale extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (\Schema::hasTable('yz_goods_sale')) {
|
||||
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('yz_goods_sale', 'ed_full')) {
|
||||
$table->decimal('ed_full', 10)->nullable()->default(0.00);
|
||||
}
|
||||
if (!Schema::hasColumn('yz_goods_sale', 'ed_reduction')) {
|
||||
$table->decimal('ed_reduction', 10)->nullable()->default(0.00);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (\Schema::hasTable('yz_goods_sale')) {
|
||||
Schema::table('yz_goods_sale', function (Blueprint $table) {
|
||||
$table->dropColumn('ed_full');
|
||||
$table->dropColumn('ed_reduction');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue