123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace Database\Seeders\Backend;
- use Database\Seeders\BaseSeeder;
- use Illuminate\Support\Facades\Hash;
- use Txj\Elastic\Facades\Eav;
- use Txj\Elastic\Facades\ES;
- /**
- * 商品订单管理
- */
- class OrderProductSeeder extends BaseSeeder
- {
- public function getColumnData()
- {
- return [
- 'user_id' => ['type' => 'uBigint', 'title' => '用户id'],
- 'order_no' => ['type' => 'string', 'title' => '订单号'],
- 'order_status' => ['type' => 'tinyint', 'default' => 0, 'title' => '订单状态 0 未支付 1 已支付 2 已退款'],
- 'order_amount_total' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '实际付款金额'],
- 'product_amount_total' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '商品总价'],
- 'preferential_type' => ['type' => 'tinyint', 'title' => '优惠类型', 'is_null' => 0],
- 'preferential_price' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '优惠金额', 'is_null' => 0],
- 'pay_amount_total' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '支付接口,返回支付金额', 'is_null' => 0],
- 'pay_channel' => ['type' => 'tinyint', 'title' => '订单支付渠道', 'is_null' => 0],
- 'out_trade_no' => ['type' => 'string', 'title' => '第三方支付流水号', 'is_null' => 1],
- 'pay_time' => ['type' => 'uBigint', 'title' => '支付时间', 'is_null' => 1],
- 'pay_info' => ['type' => 'json', 'title' => '支付返回参数', 'is_null' => 1],
- 'product_id' => ['type' => 'uBigint', 'title' => '商品id', 'is_null' => false],
- 'product_sku' => ['type' => 'string', 'title' => '产品sku', 'is_null' => false],
- // 分账
- 'order_entry_money' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '订单最终入账金额', 'is_null' => 1],
- 'is_profit' => ['type' => 'tinyint', 'default' => 0, 'title' => '是否是分账订单 1 是 0不是', 'is_null' => 1],
- 'profit_money' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '订单最终入账金额', 'is_null' => 1],
- ];
- }
- /**
- * 初始化内容
- */
- public function init()
- {
- }
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- $this->schema = 'order_product';
- $this->title = '订单表';
- $this->start();
- }
- }
|