From 1d1afe468c0a02ac390a34189b11a13c380c645d Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Fri, 19 Jun 2020 20:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BE=AE=E4=BF=A1=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8C=E6=AD=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20200619124302_wechat_users.php | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 catch/wechat/database/migrations/20200619124302_wechat_users.php diff --git a/catch/wechat/database/migrations/20200619124302_wechat_users.php b/catch/wechat/database/migrations/20200619124302_wechat_users.php new file mode 100644 index 0000000..f5e8c2f --- /dev/null +++ b/catch/wechat/database/migrations/20200619124302_wechat_users.php @@ -0,0 +1,54 @@ +table('wechat_users',array('engine'=>'Innodb', 'comment' => ' 微信用户表', 'signed' => false)); + $table->addColumn('nickname', 'string',array('limit' => 30,'default'=>'','comment'=>'用户名')) + ->addColumn('avatar', 'string',array('limit' => 255,'comment'=>'用户头像')) + ->addColumn('openid', 'string',array('limit' => 35, 'comment'=>'openid')) + ->addColumn('language', 'string',array('limit' => 20, 'comment'=>'语言')) + ->addColumn('country', 'string',array('limit' => 20, 'comment'=>'国家')) + ->addColumn('province', 'string',array('limit' => 20, 'comment'=>'省份')) + ->addColumn('city', 'string',array('limit' => 20, 'comment'=>'城市')) + ->addColumn('subscribe', 'boolean',array('limit' => 1,'default'=> 1,'comment'=>'用户状态 0 取消订阅 1 订阅')) + ->addColumn('block', 'boolean',array('limit' => 1,'default'=> 1,'comment'=>'拉黑状态 1 正常 2 拉黑')) + ->addColumn('subscribe_time', 'integer',array('default'=>0,'comment'=>'订阅时间', 'signed' => false)) + ->addColumn('subscribe_scene', 'string', ['limit' => 50, 'comment' => '订阅场景']) + ->addColumn('unionid', 'string', ['limit' => 255, 'comment' => '用户平台唯一身份认证']) + ->addColumn('sex', 'boolean',array('limit' => 1,'default'=> 1,'comment'=>'用户状态 1 男 2 女 0 未知')) + ->addColumn('remark', 'string', ['limit' => 255, 'comment' => '备注']) + ->addColumn('groupid', 'integer', ['limit' => 0, 'comment' => '分组ID']) + ->addColumn('remark', 'string', ['limit' => 255, 'comment' => '备注']) + ->addColumn('tagid_list', 'string',['limit' => 50, 'default'=>0,'comment'=>'标签列表']) + ->addColumn('created_at', 'integer', array('default'=>0,'comment'=>'创建时间', 'signed' => false )) + ->addColumn('updated_at', 'integer', array('default'=>0,'comment'=>'更新时间', 'signed' => false)) + ->addColumn('deleted_at', 'integer', array('default'=>0,'comment'=>'删除状态,0未删除 >0 已删除', 'signed' => false)) + ->create(); + } +}