DMerchantDetail.Class.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Gss
  5. * Date: 2021/4/7 0007
  6. * Time: 15:48
  7. */
  8. namespace JinDouYun\Dao\Merchant;
  9. use JinDouYun\Dao\BaseDao;
  10. class DMerchantDetail extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'finance')
  13. {
  14. $this->_table = 'qianniao_merchant_detail_1';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. 'id',//int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '收支id',
  18. 'merchantId',//int(10) NOT NULL COMMENT '商户id',
  19. 'merchantName',//varchar(255) NOT NULL COMMENT '商户名称',
  20. 'originId',//int(10) NOT NULL COMMENT '来源id',
  21. 'originNo',//varchar(50) NOT NULL COMMENT '来源编号',
  22. 'money',//decimal(15,2) DEFAULT '0.00' COMMENT '金额',
  23. 'afterMoney',//decimal(15,2) DEFAULT NULL COMMENT '变动后金额',
  24. 'type',//tinyint(1) DEFAULT NULL COMMENT '收支类型 5收入/4支出',
  25. 'source',//tinyint(1) DEFAULT NULL COMMENT '来源 1提现/2结算/3退货',
  26. 'remark',//text COMMENT '说明',
  27. 'createTime',//int(10) DEFAULT NULL COMMENT '创建时间',
  28. 'updateTime',//int(10) DEFAULT NULL COMMENT '更新时间',
  29. 'extends',//json DEFAULT NULL COMMENT '扩展字段',
  30. ];
  31. $this->_readonly = ['id'];
  32. $this->_create_autofill = [
  33. 'createTime' => time()
  34. ];
  35. $this->_update_autofill = [
  36. 'updateTime' => time()
  37. ];
  38. parent::__construct($serviceDB);
  39. }
  40. }