OrderProductSeeder.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace Database\Seeders\Backend;
  3. use Database\Seeders\BaseSeeder;
  4. use Illuminate\Support\Facades\Hash;
  5. use Txj\Elastic\Facades\Eav;
  6. use Txj\Elastic\Facades\ES;
  7. /**
  8. * 商品订单管理
  9. */
  10. class OrderProductSeeder extends BaseSeeder
  11. {
  12. public function getColumnData()
  13. {
  14. return [
  15. 'user_id' => ['type' => 'uBigint', 'title' => '用户id'],
  16. 'order_no' => ['type' => 'string', 'title' => '订单号'],
  17. 'order_status' => ['type' => 'tinyint', 'default' => 0, 'title' => '订单状态 0 未支付 1 已支付 2 已退款'],
  18. 'order_amount_total' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '实际付款金额'],
  19. 'product_amount_total' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '商品总价'],
  20. 'preferential_type' => ['type' => 'tinyint', 'title' => '优惠类型', 'is_null' => 0],
  21. 'preferential_price' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '优惠金额', 'is_null' => 0],
  22. 'pay_amount_total' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '支付接口,返回支付金额', 'is_null' => 0],
  23. 'pay_channel' => ['type' => 'tinyint', 'title' => '订单支付渠道', 'is_null' => 0],
  24. 'out_trade_no' => ['type' => 'string', 'title' => '第三方支付流水号', 'is_null' => 1],
  25. 'pay_time' => ['type' => 'uBigint', 'title' => '支付时间', 'is_null' => 1],
  26. 'pay_info' => ['type' => 'json', 'title' => '支付返回参数', 'is_null' => 1],
  27. 'product_id' => ['type' => 'uBigint', 'title' => '商品id', 'is_null' => false],
  28. 'product_sku' => ['type' => 'string', 'title' => '产品sku', 'is_null' => false],
  29. // 分账
  30. 'order_entry_money' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '订单最终入账金额', 'is_null' => 1],
  31. 'is_profit' => ['type' => 'tinyint', 'default' => 0, 'title' => '是否是分账订单 1 是 0不是', 'is_null' => 1],
  32. 'profit_money' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '订单最终入账金额', 'is_null' => 1],
  33. ];
  34. }
  35. /**
  36. * 初始化内容
  37. */
  38. public function init()
  39. {
  40. }
  41. /**
  42. * Run the database seeds.
  43. *
  44. * @return void
  45. */
  46. public function run()
  47. {
  48. $this->schema = 'order_product';
  49. $this->title = '订单表';
  50. $this->start();
  51. }
  52. }