DSystemTemplate.Class.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * 平台模版
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/11/29
  7. * Time: 15:09
  8. */
  9. namespace JinDouYun\Dao\System;
  10. use JinDouYun\Dao\BaseDao;
  11. class DSystemTemplate extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'system_template';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "title", //varchar(50) NOT NULL COMMENT '模版名称',
  20. "weixinTemplateId", //int(11) NOT NULL COMMENT '微信模板id',
  21. "enableStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '启用状态 默认5 正常 4关闭',
  22. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '删除状态 默认5 正常 4删除',
  23. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  24. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  25. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  26. "version", //varchar(50) DEFAULT NULL COMMENT '当前微信模版版本号',
  27. "type",//模版类型 1普通模版 2万能模版
  28. ];
  29. $this->_readonly = ['id'];
  30. $this->_create_autofill = [
  31. 'createTime' => time()
  32. ];
  33. $this->_update_autofill = [
  34. 'updateTime' => time()
  35. ];
  36. parent::__construct($serviceDB);
  37. }
  38. }