DCommissionGrade.Class.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * 分销等级Dao
  4. * Created by PhpStorm.
  5. * User: haoren
  6. * Date: 2020/07/22
  7. * Time: 15:00
  8. */
  9. namespace JinDouYun\Dao\Commission;
  10. use JinDouYun\Dao\BaseDao;
  11. class DCommissionGrade extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'commission_grade';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '分销商等级设置表',
  19. "enterpriseId", //int(10) DEFAULT NULL COMMENT '企业id',
  20. "name", //varchar(255) DEFAULT NULL COMMENT '等级名称',
  21. "grade", //int(10) DEFAULT NULL COMMENT '等级',
  22. "oneRate", //decimal(8,2) DEFAULT NULL COMMENT '一级佣金比例',
  23. "twoRate", //decimal(8,2) DEFAULT NULL COMMENT '二级佣金比例',
  24. "threeRate", //decimal(8,2) DEFAULT NULL COMMENT '三级佣金比例',
  25. "upgradeMode", //tinyint(1) DEFAULT NULL COMMENT '升级方式 1:满足任意条件 2:满足所有条件',
  26. "upgradeCondition", //json DEFAULT NULL COMMENT '升级条件 例: 条件id : 条件值',
  27. "deleteStatus", //tinyint(1) DEFAULT NULL COMMENT '删除状态 4:删除 5:正常',
  28. "enableStatus", //tinyint(1) DEFAULT NULL COMMENT '启用状态 4:禁用 5:启用',
  29. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  30. "createTime", //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. }