Category.php 672 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use think\Model;
  3. /**
  4. * 分类模型
  5. */
  6. class Category Extends Model
  7. {
  8. // 开启自动写入时间戳字段
  9. protected $autoWriteTimestamp = 'int';
  10. // 定义时间戳字段名
  11. protected $createTime = 'createtime';
  12. protected $updateTime = 'updatetime';
  13. // 定义字段类型
  14. protected $type = [
  15. ];
  16. /**
  17. * 读取分类类型
  18. * @return array
  19. */
  20. public static function getTypeList()
  21. {
  22. $typelist = [
  23. 'default' => __('Default'),
  24. 'page' => __('Page'),
  25. 'article' => __('Article'),
  26. 'block' => __('Block'),
  27. ];
  28. return $typelist;
  29. }
  30. }