DRewardRule.Class.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\Reward;
  10. use JinDouYun\Dao\BaseDao;
  11. class DRewardRule extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'reward_rule';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  19. "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
  20. "title", //varchar(255) DEFAULT NULL COMMENT '名称',
  21. "percentage", //decimal(10,2) DEFAULT NULL COMMENT '比例',
  22. "goods", //json DEFAULT NULL COMMENT '商品',
  23. "computed", //tinyint(1) DEFAULT '5' COMMENT '计算类型 4:不包含商品 5:包含商品',
  24. "enableStatus", //tinyint(1) DEFAULT '5' COMMENT '启用状态 4:删除 5:正常',
  25. "deleteStatus", //tinyint(1) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
  26. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  27. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  28. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  29. ];
  30. $this->_readonly = ['id'];
  31. $this->_create_autofill = [
  32. 'createTime' => time()
  33. ];
  34. $this->_update_autofill = [
  35. 'updateTime' => time()
  36. ];
  37. parent::__construct($serviceDB);
  38. }
  39. }