DCommissionOrder.Class.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace JinDouYun\Dao\Commission;
  3. use JinDouYun\Dao\BaseDao;
  4. /**
  5. * Description:分销订单记录表
  6. * Class DCommissionOrder
  7. * @package JinDouYun\Dao\Commission
  8. */
  9. class DCommissionOrder extends BaseDao
  10. {
  11. public function __construct($serviceDB = 'default')
  12. {
  13. $this->_table = 'commission_order';
  14. $this->_primary = 'id';
  15. $this->_fields = [
  16. "id",//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  17. "userCenterId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id (买家)',
  18. "customerId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '客户id (买家)',
  19. "orderId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
  20. "orderNo",//varchar(50) NOT NULL DEFAULT '' COMMENT '订单号',
  21. "goodsId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
  22. "skuId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'skuId',
  23. "goodsPrice",//decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品金额',
  24. "retUserCenterId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '返佣用户id',
  25. "retCustomerId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '返佣客户id',
  26. "retMoney",//decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分销佣金',
  27. "retLevel",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '返佣用户级别 1,2,3',
  28. "retGrade",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '返佣用户等级 1-10级',
  29. "isSettled",//tinyint(3) unsigned NOT NULL DEFAULT '4' COMMENT '是否已结算佣金 (4未结算 5已结算)',
  30. "settleTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '结算时间',
  31. "isSelf",//tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否自购返佣金 (4否 5是)',
  32. "createTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  33. "updateTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  34. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  35. "retRate",//decimal(10,2) DEFAULT '0.00' COMMENT '返佣百分比',
  36. "buyNum",//varchar(50) DEFAULT '0' COMMENT '商品数量',
  37. "goodsName",//varchar(255) DEFAULT '' COMMENT '商品名称',
  38. "shopName",//varchar(255) DEFAULT '' COMMENT '店铺名称',
  39. "unitName",//varchar(50) DEFAULT '' COMMENT '单位名称',
  40. "specGroup",//json DEFAULT NULL COMMENT '规格组合',
  41. "goodsImages",//varchar(255) DEFAULT '' COMMENT '商品图片',
  42. ];
  43. $this->_readonly = ['id'];
  44. $this->_create_autofill = [
  45. 'createTime' => time()
  46. ];
  47. $this->_update_autofill = [
  48. 'updateTime' => time()
  49. ];
  50. parent::__construct($serviceDB);
  51. }
  52. }