DCommissionSetting.Class.php 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 DCommissionSetting extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'commission_setting';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '分销基础设置表自增id',
  19. "enterpriseId", //int(10) NOT NULL COMMENT '企业id',
  20. "level", //tinyint(2) DEFAULT '3' COMMENT '分销层级 1~3级',
  21. "self", //tinyint(1) DEFAULT '4' COMMENT '分销自购 4:关闭 5:自购返佣',
  22. "audit", //tinyint(1) DEFAULT '5' COMMENT '分销客户审核 4:关闭 5:开启',
  23. "businessmanCondition", //tinyint(1) DEFAULT '1' COMMENT '成为分销商条件 0:无条件 1:申请 3:消费次数 4:消费金额 5:购买商品',
  24. "buyNum", //int(10) DEFAULT NULL COMMENT '消费次数',
  25. "buyAmount", //decimal(8,2) DEFAULT NULL COMMENT '消费金额',
  26. "buyGoods", //json DEFAULT NULL COMMENT '指定商品',
  27. "buyCondition", //tinyint(1) DEFAULT NULL COMMENT '消费条件 4:付款后 5:订单完成',
  28. "image", //varchar(255) DEFAULT NULL COMMENT '申请图片',
  29. "infoStatus", //tinyint(1) DEFAULT '5' COMMENT '补全资料 4:不必补全 5:必须补全',
  30. "info", //json DEFAULT NULL COMMENT '资料内容',
  31. "descStatus", //tinyint(1) DEFAULT '4' COMMENT '是否展示申请协议 4:不展示 5:展示',
  32. "title", // varchar(255) DEFAULT NULL COMMENT '申请协议标题',
  33. "desc", //varchar(255) DEFAULT NULL COMMENT '申请协议',
  34. "subConditions", //tinyint(1) DEFAULT '1' COMMENT '成为下线条件 1:首次点击链接 2:首次下单 3:首次付款',
  35. "goods", //tinyint(1) DEFAULT '4' COMMENT '商品默认分销 4:不默认 5:默认 ',
  36. "mode", //tinyint(1) DEFAULT '5' COMMENT '佣金计算方式 4:订单金额 5:实际支付金额',
  37. "quota", //decimal(10,2) DEFAULT '0.00' COMMENT '最低提现额度',
  38. "fee", //int(10) DEFAULT '0' COMMENT '提现手续费(%)',
  39. "freeStart", //decimal(10,2) DEFAULT '0.00' COMMENT '免手续费区间开始',
  40. "freeEnd", //decimal(10,2) DEFAULT '0.00' COMMENT '免手续费区间结束',
  41. "day", //int(10) DEFAULT '0' COMMENT '结算天数',
  42. "withdrawAudit", //tinyint(1) DEFAULT '5' COMMENT '提现审核方式 4:自动审核 5:手动审核',
  43. "withdrawGrade", // int(3) DEFAULT '0' COMMENT '提现自动审核最低等级',
  44. "withdrawAmount", // decimal(8,2) DEFAULT NULL COMMENT '提现自动审核最低金额',
  45. "autoPay", // tinyint(1) DEFAULT NULL COMMENT '自动打款 4:关闭 5:开启',
  46. "payType", //tinyint(1) DEFAULT '5' COMMENT '打款方式 4:自动打款到微信 5:手动打款',
  47. "withdrawType", //tinyint(1) DEFAULT '4' COMMENT '手动打款支持提现方式 4:支付宝 5:银行卡',
  48. "withdrawInfo", //json DEFAULT NULL COMMENT '手动提现数据 包含:多个银行卡号,支付宝',
  49. "leaderboard", //tinyint(1) DEFAULT '4' COMMENT '排行榜展示 4:关闭 5:开启',
  50. "createTime", //int(10) DEFAULT '0' COMMENT '创建时间',
  51. "updateTime", //int(10) DEFAULT '0' COMMENT '修改时间',
  52. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  53. ];
  54. $this->_readonly = ['id'];
  55. $this->_create_autofill = [
  56. 'createTime' => time()
  57. ];
  58. $this->_update_autofill = [
  59. 'updateTime' => time()
  60. ];
  61. parent::__construct($serviceDB);
  62. }
  63. }