You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
617 B

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zhengmingwei
  5. * Date: 2020/3/16
  6. * Time: 5:03 PM
  7. */
  8. namespace addons\unishop\model;
  9. use think\Model;
  10. class Category extends Model
  11. {
  12. // 表名
  13. protected $name = 'unishop_category';
  14. // 开启自动写入时间戳字段
  15. protected $autoWriteTimestamp = 'int';
  16. // 定义时间戳字段名
  17. protected $createTime = 'createtime';
  18. protected $updateTime = 'updatetime';
  19. /**
  20. * 处理图片
  21. * @param $value
  22. * @return string
  23. */
  24. public function getImageAttr($value) {
  25. return Config::getImagesFullUrl($value);
  26. }
  27. }