DCustomerBalanceTurnover.Class.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * 客户余额流水Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2020/09/12
  7. * Time: 11:30
  8. */
  9. namespace JinDouYun\Dao\Customer;
  10. use JinDouYun\Dao\BaseDao;
  11. class DCustomerBalanceTurnover extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'customer_balance_turnover';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '客户余额流水',
  19. "sourceId", //int(10) DEFAULT NULL COMMENT '来源id',
  20. "sourceNo", //char(25) DEFAULT NULL COMMENT '来源单号',
  21. "source", //tinyint(2) DEFAULT NULL COMMENT '来源',
  22. "customerId", //int(10) DEFAULT NULL COMMENT '客户id',
  23. "userCenterId", //int(10) DEFAULT NULL COMMENT 'userCenterId',
  24. "shopId", //int(10) DEFAULT NULL COMMENT '商铺id',
  25. "money", //decimal(8,2) DEFAULT NULL COMMENT '金额',
  26. "balance", //decimal(8,2) DEFAULT NULL COMMENT '变动后余额',
  27. "type", //tinyint(1) DEFAULT NULL COMMENT '出入状态 4:支出 5:支入',
  28. "desc", //varchar(255) DEFAULT NULL COMMENT '文字描述',
  29. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  30. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  31. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  32. ];
  33. $this->_readonly = ['id'];
  34. $this->_create_autofill = [
  35. 'createTime' => time()
  36. ];
  37. $this->_update_autofill = [
  38. 'updateTime' => time()
  39. ];
  40. parent::__construct($serviceDB);
  41. }
  42. }