SystemMessage.php 596 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\common\model;
  3. class SystemMessage extends \think\Model
  4. {
  5. protected $pk = 'id';
  6. protected $table = 'cy_system_message';
  7. protected $dateFormat = false; //时间戳格式不自动转换
  8. public function getCreateTimeAttr($value)
  9. {
  10. if ($value > 0) {
  11. return date('Y-m-d H:i:s', $value);
  12. } else {
  13. return '';
  14. }
  15. }
  16. public function getUpdateTimeAttr($value)
  17. {
  18. if ($value > 0) {
  19. return date('Y-m-d H:i:s', $value);
  20. } else {
  21. return '';
  22. }
  23. }
  24. }