DMerchantFlow.Class.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace JinDouYun\Dao\Finance;
  3. use JinDouYun\Dao\BaseDao;
  4. /**
  5. * @copyright Copyright (c) https://www.qianniaovip.com All rights reserved
  6. * Description:商户资金变动记录表
  7. * Class DMerchantFlow
  8. * @package JinDouYun\Dao\Finance
  9. */
  10. class DMerchantFlow extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'finance')
  13. {
  14. $this->_table = "merchant_flow";
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. "id",//int(11) NOT NULL AUTO_INCREMENT,
  18. "no",//varchar(30) DEFAULT NULL COMMENT '流水号',
  19. "merchantId",//int(10) DEFAULT NULL COMMENT '商户Id',
  20. "merchantName",//varchar(30) DEFAULT NULL COMMENT '商户名称',
  21. "shopId",//int(10) DEFAULT NULL COMMENT '店铺Id',
  22. "shopName",//varchar(30) DEFAULT NULL COMMENT '店铺名称',
  23. "originId",//int(10) DEFAULT NULL COMMENT '原单据id',
  24. "originNo",//varchar(30) DEFAULT NULL COMMENT '原始单号',
  25. "tradeMoney",//decimal(10,2) NOT NULL COMMENT '流水金额 eg: 支付100元 提现100元',
  26. "payType",//tinyint(3) NOT NULL DEFAULT '0' COMMENT '支付方式',
  27. "originMoney",//decimal(10,2) NOT NULL COMMENT '原金额',
  28. "changeMoney",//decimal(10,2) NOT NULL COMMENT '变动金额',
  29. "nowMoney",//decimal(10,2) NOT NULL COMMENT '变动后金额',
  30. "rate",//decimal(10,4) DEFAULT NULL COMMENT '抽成比率 eg: 0.006% (0.006)',
  31. "fee",//decimal(10,2) DEFAULT NULL COMMENT '抽成金额',
  32. "type",//tinyint(3) DEFAULT '5' COMMENT '5加 4减',
  33. "isPayment",//tinyint(3) DEFAULT '4' COMMENT '是否是第三方支付手续费 5是 4否',
  34. "isPlatform",//tinyint(3) DEFAULT '4' COMMENT '记录类型 4 商户 5 平台',
  35. "source",//tinyint(3) DEFAULT '1' COMMENT '1支付结算 2提现',
  36. "describe",//varchar(50) DEFAULT NULL COMMENT '描述',
  37. "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  38. "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  39. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  40. ];
  41. $this->_readonly = ['id'];
  42. $this->_create_autofill = [
  43. 'createTime' => time()
  44. ];
  45. $this->_update_autofill = [
  46. 'updateTime' => time()
  47. ];
  48. parent::__construct($serviceDB);
  49. }
  50. }