REAPI/database/migrations/20009999999983_install_taobao_table.php
mzeros b0fbd5c5a6 feat(database): 添加多个数据库迁移脚本
- 新增 test、taobao、system、suoka 和 stat 数据库表的迁移脚本- 包含各种数据表的创建和字段定义
- 为系统初始化、统计、对账等功能提供数据支持
2024-12-22 17:42:44 +08:00

90 lines
5.7 KiB
PHP

<?php
use think\admin\extend\PhinxExtend;
use think\migration\Migrator;
@set_time_limit(0);
@ini_set('memory_limit', -1);
class InstallTaobaoTable extends Migrator
{
/**
* 创建数据库
*/
public function change()
{
$this->_create_taobao_refud();
}
/**
* 创建数据对象
* @class TaobaoRefud
* @table taobao_refud
* @return void
*/
private function _create_taobao_refud()
{
// 创建数据表对象
$table = $this->table('taobao_refud', [
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '',
]);
// 创建或更新数据表
PhinxExtend::upgrade($table, [
['order_id', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退款编号', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['支付宝交易号', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['订单付款时间', 'time', ['default' => NULL, 'null' => true, 'comment' => '']],
['商品编码', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退款完结时间', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['买家实际支付金额', 'double', ['default' => NULL, 'null' => true, 'comment' => '']],
['宝贝标题', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['买家退款金额', 'double', ['default' => NULL, 'null' => true, 'comment' => '']],
['手工退款/系统退款', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['是否需要退货', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退款的申请时间', 'time', ['default' => NULL, 'null' => true, 'comment' => '']],
['超时时间', 'time', ['default' => NULL, 'null' => true, 'comment' => '']],
['退款状态', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['货物状态', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退货物流信息', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['发货物流信息', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['客服介入状态', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卖家真实姓名', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卖家真实姓名(新)', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卖家退货地址', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卖家邮编', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卖家电话', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卖家手机', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退货物流单号', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退货物流公司', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['买家退款原因', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['买家退款说明', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['买家退货时间', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['责任方', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['售中或售后', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['备注标签', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['商家备注', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['完结时间', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['部分退款/全部退款', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['审核操作人', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['审核操作人新会员名', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['举证超时', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['是否零秒响应', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退款操作人', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退款操作人新会员名', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['退款原因标签', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['业务类型', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['是否帮他退款', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['帮他退款操作账号', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['小额收款', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['淘特订单', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卡号', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['卡密', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
['渠道', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
], [
], false);
}
}