DMessage.Class.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * 消息Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2020/03/31
  7. * Time: 15:41
  8. */
  9. namespace JinDouYun\Dao\Message;
  10. use JinDouYun\Dao\BaseDao;
  11. class DMessage extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'message';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
  19. "sendId", //int(10) NOT NULL DEFAULT '0' COMMENT '发送人id 0为系统发送',
  20. "receiveId", //int(10) NOT NULL COMMENT '接收人id',
  21. "title", //varchar(255) NOT NULL COMMENT '标题',
  22. "content", //text NOT NULL COMMENT '内容',
  23. "receiveStatus", //tinyint(3) NOT NULL COMMENT '已读状态 4:未读 5:已读',
  24. "type", //tinyint(3) NOT NULL COMMENT '类型 1:库存不足消息',
  25. "deleteStatus",
  26. "sendTime", //int(10) NOT NULL COMMENT '发送时间',
  27. "receiveTime", //int(10) DEFAULT NULL COMMENT '接收时间',
  28. "createTime", //int(10) NOT NULL COMMENT '创建时间',
  29. ];
  30. $this->_readonly = ['id'];
  31. $this->_create_autofill = [
  32. 'createTime' => time()
  33. ];
  34. parent::__construct($serviceDB);
  35. }
  36. }