CommentImage.php 603 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\common\model;
  10. /**
  11. * 商品评价图片模型
  12. * Class CommentImage
  13. * @package app\common\model
  14. */
  15. class CommentImage extends BaseModel
  16. {
  17. protected $name = 'comment_image';
  18. protected $updateTime = false;
  19. /**
  20. * 关联文件库
  21. * @return \think\model\relation\BelongsTo
  22. */
  23. public function file()
  24. {
  25. return $this->belongsTo('UploadFile', 'image_id', 'file_id')
  26. ->bind(['file_path', 'file_name', 'file_url']);
  27. }
  28. }