DIntegralRule.Class.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * 积分规则Dao
  4. * Created by PhpStorm.
  5. * User: haoren
  6. * Date: 2021/03/25
  7. * Time: 15:00
  8. */
  9. namespace JinDouYun\Dao\Integral;
  10. use JinDouYun\Dao\BaseDao;
  11. class DIntegralRule extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'integral_rule';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  19. "title", //varchar(255) DEFAULT NULL COMMENT '规则名',
  20. "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
  21. "amount", //decimal(10,2) DEFAULT '0.00' COMMENT '每满足金额',
  22. "integral", //decimal(10,2) DEFAULT '0.00' COMMENT '奖励积分',
  23. "goods", //json DEFAULT NULL COMMENT '商品数据',
  24. "integralTotal", //decimal(10,2) DEFAULT '0.00' COMMENT '累计发放积分',
  25. "enableStatus", //tinyint(1) DEFAULT '5' COMMENT '启用状态 4:失效 5:正常',
  26. "deleteStatus", //tinyint(1) DEFAULT NULL COMMENT '删除状态 4:删除 5:正常',
  27. "createTime", //int(11) DEFAULT NULL COMMENT '创建时间',
  28. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  29. "extend", //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. }