first commit
This commit is contained in:
1
滴滴淘/diditao/database/migrations/.pydio
Normal file
1
滴滴淘/diditao/database/migrations/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
e826f401-f80b-45ce-81ce-92447cfacaf4
|
||||
58
滴滴淘/diditao/database/migrations/20200501184250_user.php
Normal file
58
滴滴淘/diditao/database/migrations/20200501184250_user.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class User extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user',['engine'=>'Innodb', 'comment' => '用户表','collation'=>'utf8mb4_general_ci' ,'signed' => false]);
|
||||
$table->addColumn(Column::char('cellphone',11)->setComment('手机号码'))
|
||||
->addColumn(Column::string('nickname',50)->setComment('用户昵称')->setNullable())
|
||||
->addColumn(Column::string('password',255)->setComment('登录密码'))
|
||||
->addNullableMorphs('member')
|
||||
->addColumn(Column::tinyInteger('status')->setComment('用户状态1 正常 -9 禁用'))
|
||||
->addColumn(Column::unsignedInteger('father_id')->setComment('爸爸级ID')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('grandfather_id')->setComment('爷爷级ID')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('refer_id')->setComment('上级推广ID')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('tree_id')->setComment('顶级推广ID')->setDefault(0))
|
||||
->addColumn(Column::string('invite_code')->setComment('注册使用的邀请码')->setDefault(0))
|
||||
->addColumn(Column::string('reg_ip',50)->setComment('注册IP'))
|
||||
->addColumn(Column::string('last_login_ip',50)->setComment('最后登录IP'))
|
||||
->addColumn(Column::unsignedInteger('last_login_time')->setComment('最后登录时间'))
|
||||
->addColumn(Column::unsignedInteger('delete_time')->setComment('删除时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('create_time')->setComment('创建时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setComment('更新时间')->setDefault(0))
|
||||
->addIndex('cellphone')
|
||||
->addIndex('invite_code')
|
||||
->addIndex('last_login_ip')
|
||||
->addIndex('last_login_time')
|
||||
->create();
|
||||
}
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
40
滴滴淘/diditao/database/migrations/20200502031751_buyer.php
Normal file
40
滴滴淘/diditao/database/migrations/20200502031751_buyer.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Buyer extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('buyer',['engine'=>'Innodb', 'comment' => '买家用户表','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::string('true_name',20)->setComment('真实姓名'))
|
||||
->addColumn(Column::tinyInteger('group_id')->setComment('用户组')->setDefault(1))
|
||||
->addColumn(Column::char('id_nums',18)->setComment('身份证号码')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('district_id')->setComment('省市区ID')->setDefault(0))
|
||||
->addIndex('id_nums')
|
||||
->addIndex('district_id')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
44
滴滴淘/diditao/database/migrations/20200502031756_seller.php
Normal file
44
滴滴淘/diditao/database/migrations/20200502031756_seller.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Seller extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('seller',['engine'=>'Innodb', 'comment' => '商家用户','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::tinyInteger('recycle_type')->setComment('任务回收设置')->setDefault(1))
|
||||
->addColumn(Column::tinyInteger('refund_type')->setComment('返款类型')->setDefault(1))
|
||||
->addColumn(Column::unsignedInteger('charge_bank_id')->setComment('充值银行卡ID')->setDefault(1))
|
||||
->addColumn(Column::string('wechat',50)->setComment('微信')->setNullable())
|
||||
->addColumn(Column::string('qq',50)->setComment('QQ')->setNullable())
|
||||
->addColumn(Column::string('relate_wechat',20)->setComment('关联平台微信')->setNullable())
|
||||
->addColumn(Column::string('relate_qq',20)->setComment('关联平台QQ')->setNullable())
|
||||
->addColumn(Column::tinyInteger('status')->setComment('状态')->setDefault(1))
|
||||
->addIndex('wechat')
|
||||
->addIndex('qq')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
42
滴滴淘/diditao/database/migrations/20200502031801_refer.php
Normal file
42
滴滴淘/diditao/database/migrations/20200502031801_refer.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Refer extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('refer',['engine'=>'Innodb', 'comment' => '推广用户表','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::string('true_name',20)->setComment('真实姓名'))
|
||||
->addColumn(Column::string('wechat',50)->setComment('微信')->setNullable())
|
||||
->addColumn(Column::string('qq',50)->setComment('QQ')->setNullable())
|
||||
->addColumn(Column::string('relate_wechat',20)->setComment('关联平台微信')->setNullable())
|
||||
->addColumn(Column::string('relate_qq',20)->setComment('关联平台QQ')->setNullable())
|
||||
->addColumn(Column::tinyInteger('status')->setComment('状态')->setDefault(1))
|
||||
->addIndex('wechat')
|
||||
->addIndex('qq')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserInviteCode extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_invite_code',['engine'=>'Innodb', 'comment' => '用户邀请码','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::string('invite_code',50)->setComment('推广码'))
|
||||
->addColumn(Column::tinyInteger('channel_id')->setComment('推广渠道ID'))
|
||||
->addColumn(Column::string('remark',50)->setComment('说明'))
|
||||
->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['invite_code'],['unique' => true])
|
||||
->addIndex(['remark'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserInviteChannel extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_invite_channel',['engine'=>'Innodb', 'comment' => '用户邀请渠道','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::string('title',50)->setComment('渠道名称'))
|
||||
->addColumn(Column::string('remark',50)->setComment('渠道说明')->setNullable())
|
||||
->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间'))
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class LogSmsRecord extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('log_sms_record',['engine'=>'Innodb', 'comment' => '手机验证码发送记录','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::char('cellphone',11)->setComment('手机号码'))
|
||||
->addColumn(Column::string('scene',20)->setComment('验证码场景'))
|
||||
->addColumn(Column::tinyInteger('platform_id')->setComment('公司平台ID')->setDefault(1))
|
||||
->addColumn(Column::tinyInteger('sms_provider_id')->setComment('短信平台ID')->setDefault(1))
|
||||
->addColumn(Column::unsignedInteger('user_id')->setDefault(0)->setComment('关联用户'))
|
||||
->addColumn(Column::json('param')->setComment('变量参数'))
|
||||
->addColumn(Column::unsignedInteger('template_id')->setComment('短信模板ID'))
|
||||
->addColumn(Column::tinyInteger('status')->setComment('发送状态')->setDefault(1))
|
||||
->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间'))
|
||||
->addIndex(['cellphone'])
|
||||
->addIndex(['scene'])
|
||||
->addIndex(['user_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
45
滴滴淘/diditao/database/migrations/20200509173310_uploads.php
Normal file
45
滴滴淘/diditao/database/migrations/20200509173310_uploads.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Uploads extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('uploads')->setCollation('utf8mb4_general_ci')->setComment('图片上传记录表');
|
||||
$table
|
||||
->addColumn(Column::string('file_type',30)->setComment('图片类型'))
|
||||
->addColumn(Column::tinyInteger('is_auth')->setComment('是否需要鉴权查看')->setDefault(0))
|
||||
->addColumn(Column::tinyInteger('water_type')->setComment('水印类型0=无,1=常规水印2=混淆水印')->setDefault(0))
|
||||
->addColumn(Column::integer('user_id')->setComment('关联用户ID,0=无关联')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('hash_id')->setComment('hash表ID'))
|
||||
->addColumn(Column::unsignedInteger("delete_time")->setComment('删除时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['hash_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UploadHash extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('upload_hash')->setCollation('utf8mb4_general_ci')->setComment('图片上传记录表');
|
||||
$table
|
||||
->addColumn(Column::string('save_path')->setComment('本地保存路径'))
|
||||
->addColumn(Column::string('local_path')->setComment('本地保存路径'))
|
||||
->addColumn(Column::string('file_name')->setComment('压缩后的图片名称'))
|
||||
->addColumn(Column::string('origin_name')->setComment('原始图片名称'))
|
||||
->addColumn(Column::string('water_name')->setComment('带水印的图片名')->setNullable())
|
||||
->addColumn(Column::tinyInteger('oss_id')->setComment('ossId')->setDefault(1))
|
||||
->addColumn(Column::tinyInteger('oss_path')->setComment('oss是否上传')->setDefault(0))
|
||||
->addColumn(Column::char('file_sha1',50)->setComment('文件sha1'))
|
||||
->addColumn(Column::char('extension',40)->setComment('文件后缀'))
|
||||
->addColumn(Column::unsignedInteger('file_size')->setComment('文件大小'))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['local_path'])
|
||||
->addIndex(['file_sha1'])
|
||||
->addIndex(['extension'])
|
||||
->addIndex(['file_size'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserIdCard extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_id_card')->setCollation('utf8mb4_general_ci')->setComment('用户身份证认证');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::unsignedInteger('front_image_id')->setComment('正面身份证图片ID'))
|
||||
->addColumn(Column::unsignedInteger('bank_image_id')->setComment('反面身份证图片ID')->setNullable())
|
||||
->addColumn(Column::string('true_name',20)->setComment('真实姓名'))
|
||||
->addColumn(Column::char('id_card_num',18)->setComment('身份证号码'))
|
||||
->addColumn(Column::tinyInteger('status')->setComment('状态0=待验证-1=未通过1=通过')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('api_record_id')->setComment('API请求ID')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['id_card_num'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class LogApiRequest extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('log_api_record')->setCollation('utf8mb4_general_ci')->setComment('api请求记录表');
|
||||
$table->addColumn(Column::unsignedInteger('api_id')->setComment('API接口ID'))
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('用户ID')->setDefault(0))
|
||||
->addColumn(Column::string('api_url')->setComment('请求地址')->setNullable())
|
||||
->addColumn(Column::json('param')->setComment('参数'))
|
||||
->addColumn(Column::tinyInteger('status')->setComment('返回状态'))
|
||||
->addColumn(Column::json('result_data')->setComment('返回数据')->setNullable())
|
||||
->addColumn(Column::unsignedInteger('create_time')->setComment('创建时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setComment('更新时间')->setDefault(0))
|
||||
->addIndex(['api_id'])
|
||||
->addIndex(['user_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class BuyerCertificationRecord extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('buyer_certification_record',['engine'=>'Innodb', 'comment' => '买家用户实名认证记录','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::unsignedInteger('user_id_card_id')->setComment('关联身份证认证ID'))
|
||||
->addColumn(Column::unsignedInteger('user_bank_id')->setComment('关联用户银行卡认证ID'))
|
||||
->addColumn(Column::unsignedInteger('user_image_id')->setComment('买家用户手势图ID'))
|
||||
->addColumn(Column::char('ip_address')->setDefault(0)->setComment('提交IP地址'))
|
||||
->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间'))
|
||||
->addIndex('user_id')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
46
滴滴淘/diditao/database/migrations/20200512154035_user_bank.php
Normal file
46
滴滴淘/diditao/database/migrations/20200512154035_user_bank.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserBank extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_bank',['engine'=>'Innodb', 'comment' => '用户银行卡','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::unsignedInteger('bank_id')->setComment('关联银行ID'))
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::string('bank_owner',20)->setComment('卡主')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('district_id')->setComment('区县ID'))
|
||||
->addColumn(Column::string('bank_num',20)->setComment('银行账号'))
|
||||
->addColumn(Column::tinyInteger('status')->setComment('状态')->setDefault(1))
|
||||
->addColumn(Column::string('remark')->setComment('状态说明')->setNullable())
|
||||
->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间'))
|
||||
->addIndex('user_id')
|
||||
->addIndex('bank_num')
|
||||
->addIndex('bank_id')
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AppApiList extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('app_api_list')->setCollation('utf8mb4_general_ci')->setComment('平台API接口列表');
|
||||
$table
|
||||
->addColumn(Column::string('api_name')->setComment('API平台调用name'))
|
||||
->addColumn(Column::string('api_provider')->setComment('API提供商(中文)'))
|
||||
->addColumn(Column::string('api_doc')->setComment('API文档地址')->setNullable())
|
||||
->addColumn(Column::string('api_key',255)->setComment('api的key'))
|
||||
->addColumn(Column::string('api_secret',255)->setComment('api的secret'))
|
||||
->addColumn(Column::string('api_remark',255)->setComment('备注'))
|
||||
->addColumn(Column::string('api_remark',255)->setComment('备注'))
|
||||
->addColumn(Column::integer('left_times')->setComment('剩余次数')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['api_name'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class ApiBankAuth extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('api_bank_auth')->setCollation('utf8mb4_general_ci')->setComment('银行卡四要素认证结果');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('record_id')->setComment('关联buyer_certification_record的ID'))
|
||||
->addColumn(Column::string('api_request_id')->setComment('API请求记录ID'))
|
||||
->addColumn(Column::string('order_no')->setComment('API订单ID')->setNullable())
|
||||
->addColumn(Column::tinyInteger('result_id')->setComment('四要素核验结果0 认证一致,1 认证失败,2未认证,3 已注销'))
|
||||
->addColumn(Column::string('remark',255)->setComment('返回结果说明'))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['record_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AdminUser extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('admin_user')->setCollation('utf8mb4_general_ci')->setComment('管理员用户表');
|
||||
$table
|
||||
->addColumn(Column::char('cellphone',11)->setComment('手机号码'))
|
||||
->addColumn(Column::string('username',50)->setComment('用户名'))
|
||||
->addColumn(Column::string('password',255)->setComment('登录密码'))
|
||||
->addColumn(Column::string('full_name',50)->setComment('姓名'))
|
||||
->addColumn(Column::string('wechat',50)->setComment('微信')->setNullable())
|
||||
->addColumn(Column::string('qq',50)->setComment('QQ')->setNullable())
|
||||
->addColumn(Column::tinyInteger('group_id')->setComment('用户组'))
|
||||
->addColumn(Column::string('last_login_ip',50)->setComment('最后登录IP')->setNullable())
|
||||
->addColumn(Column::unsignedInteger('last_login_time')->setComment('最后登录时间')->setNullable())
|
||||
->addColumn(Column::unsignedInteger('delete_time')->setComment('删除时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('create_time')->setComment('创建时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setComment('更新时间')->setDefault(0))
|
||||
->addIndex(['username'])
|
||||
->addIndex(['cellphone'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AppBankList extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('app_bank_list',['engine'=>'Innodb', 'comment' => '平台银行列表','collation'=>'utf8mb4_general_ci' , 'signed' => false]);
|
||||
$table->addColumn(Column::string('bank_title',50)->setComment('简称'))
|
||||
->addColumn(Column::string('full_name',50)->setComment('全称'))
|
||||
->addColumn(Column::string('icon',50)->setComment('图标')->setNullable())
|
||||
->addColumn(Column::tinyInteger('sort')->setComment('排序')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('delete_time')->setDefault(0)->setComment('删除时间'))
|
||||
->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间'))
|
||||
->addIndex(['bank_title'],['unique'=>true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class ApiPhoneDetail extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('api_phone_detail')->setCollation('utf8mb4_general_ci')->setComment('手机号码归属地运营商等信息');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::char('cellphone',11)->setComment('手机号码'))
|
||||
->addColumn(Column::string('isp',50)->setComment('运营商'))
|
||||
->addColumn(Column::unsignedInteger('district_id')->setComment('归属地ID'))
|
||||
->addColumn(Column::tinyInteger('phone_age')->setComment('在网时间,0=未查询')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger('api_record_id')->setComment('API请求ID')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['cellphone'])
|
||||
->addIndex(['isp'])
|
||||
->addIndex(['district_id'])
|
||||
->addIndex(['phone_age'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserCreditPoint extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_credit_point')->setCollation('utf8mb4_general_ci')->setComment('买家信用积分');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addMorphs('action')
|
||||
->addColumn(Column::tinyInteger('sub_id')->setComment('行为子类型')->setDefault(0))
|
||||
->addColumn(Column::integer('origin_point')->setComment('原始信用分'))
|
||||
->addColumn(Column::integer('point')->setComment('发生信用分'))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserWechat extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_wechat')->setCollation('utf8mb4_general_ci')->setComment('买家微信');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::string('detail')->setComment('微信号码'))
|
||||
->addColumn(Column::integer('app_wechat_id')->setComment('关联平台微信ID'))
|
||||
->addColumn(Column::tinyInteger('status')->setDefault(0)->setComment('认证状态0=认证中1=通过-1=未通过'))
|
||||
->addColumn(Column::string('remark')->setNullable()->setComment('未通过的理由'))
|
||||
->addColumn(Column::unsignedInteger('admin_id')->setNullable())
|
||||
->addColumn(Column::unsignedInteger("admin_time")->setComment('审核时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['detail'])
|
||||
->addIndex(['app_wechat_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
47
滴滴淘/diditao/database/migrations/20200522151001_user_qq.php
Normal file
47
滴滴淘/diditao/database/migrations/20200522151001_user_qq.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserQq extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_qq')->setCollation('utf8mb4_general_ci')->setComment('买家微信');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::string('detail')->setComment('QQ号码'))
|
||||
->addColumn(Column::integer('app_qq_id')->setComment('关联平台微信ID'))
|
||||
->addColumn(Column::tinyInteger('status')->setDefault(0)->setComment('认证状态0=认证中1=通过-1=未通过'))
|
||||
->addColumn(Column::string('remark')->setNullable()->setComment('未通过的理由'))
|
||||
->addColumn(Column::unsignedInteger('admin_id')->setNullable())
|
||||
->addColumn(Column::unsignedInteger("admin_time")->setComment('审核时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['detail'])
|
||||
->addIndex(['app_qq_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class UserAlipay extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('user_alipay')->setCollation('utf8mb4_general_ci')->setComment('买家支付宝');
|
||||
$table
|
||||
->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID'))
|
||||
->addColumn(Column::string('detail')->setComment('支付宝号码'))
|
||||
->addColumn(Column::integer('alipay_image_id')->setComment('认证图片'))
|
||||
->addColumn(Column::tinyInteger('status')->setDefault(0)->setComment('认证状态0=认证中1=通过-1=未通过'))
|
||||
->addColumn(Column::string('remark')->setNullable()->setComment('未通过的理由'))
|
||||
->addColumn(Column::unsignedInteger('admin_id')->setNullable())
|
||||
->addColumn(Column::unsignedInteger("admin_time")->setComment('审核时间')->setDefault(0))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->addIndex(['user_id'])
|
||||
->addIndex(['detail'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class AppContactList extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('app_contact_list')->setCollation('utf8mb4_general_ci')->setComment('平台联系方式');
|
||||
$table
|
||||
->addColumn(Column::string('client')->setComment('buyer、seller、refer'))
|
||||
->addColumn(Column::string('contact_type')->setComment('wechat=微信wechat_work=企业微信qq=qq,phone=phone'))
|
||||
->addColumn(Column::string('detail')->setComment('关联平台微信ID'))
|
||||
->addColumn(Column::tinyInteger('status')->setDefault(1)->setComment('1可用0=不可用'))
|
||||
->addColumn(Column::unsignedInteger("create_time")->setComment('创建时间'))
|
||||
->addColumn(Column::unsignedInteger("update_time")->setComment('更新时间'))
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user