OrderProfitRecordSeeder.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 OrderProfitRecordSeeder extends BaseSeeder
  11. {
  12. public function getColumnData()
  13. {
  14. return [
  15. 'product_type' => ['type' => 'tinyint', 'title' => '商品类型 1 产品 2 套餐'],
  16. 'order_id' => ['type' => 'uBigint', 'title' => '订单id'],
  17. 'pay_channel' => ['type' => 'tinyint', 'default' => 0, 'title' => '支付渠道 1 微信 2 支付宝'],
  18. 'order_amount_total' => ['type' => 'text', 'default' => 0, 'title' => '实际付款总金额'],
  19. 'profit_money' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '分润金额', 'is_null' => 1],
  20. 'status' => ['type' => 'string', 'default' => 0, 'title' => '状态 1 进行中 2 已完成'],
  21. 'profit_account' => ['type' => 'string', 'title' => '分账接收方帐号'],
  22. 'profit_name' => ['type' => 'string', 'title' => '分账接收方全称'],
  23. 'profit_relation_type' => ['type' => 'string', 'title' => '与分账方的关系类型'],
  24. 'profit_custom_relation' => ['type' => 'json', 'title' => '自定义的分账关系'],
  25. 'profit_ratio' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '接收方分账比例'],
  26. ];
  27. }
  28. /**
  29. * 初始化内容
  30. */
  31. public function init()
  32. {
  33. }
  34. /**
  35. * Run the database seeds.
  36. *
  37. * @return void
  38. */
  39. public function run()
  40. {
  41. $this->schema = 'order_profit_record';
  42. $this->title = '订单微信分账表';
  43. $this->start();
  44. }
  45. }