DSystem.Class.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * 设置管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/11/26
  7. * Time: 14:30
  8. */
  9. namespace JinDouYun\Dao\SystemSettings;
  10. use JinDouYun\Dao\BaseDao;
  11. class DSystem extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'system';
  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. "type", //tinyint(3) DEFAULT NULL COMMENT '设置类型 1小程序设置 2模板消息设置 3分类模板设置 4字节小程序设置',
  21. "content", //json DEFAULT NULL COMMENT '内容',
  22. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  23. "updateTime", //int(10) DEFAULT NULL COMMENT '更新时间',
  24. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  25. ];
  26. $this->_readonly = ['id'];
  27. $this->_create_autofill = [
  28. 'createTime' => time()
  29. ];
  30. $this->_update_autofill = [
  31. 'updateTime' => time()
  32. ];
  33. parent::__construct($serviceDB);
  34. }
  35. }