GoodsServiceGuarantee.php 653 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\model;
  3. use app\common\service\FileService;
  4. use think\model\concern\SoftDelete;
  5. class GoodsServiceGuarantee extends BaseModel
  6. {
  7. use SoftDelete;
  8. protected $deleteTime = 'delete_time';
  9. function getIconAttr($fieldValue, $data)
  10. {
  11. return FileService::getFileUrl($fieldValue);
  12. }
  13. function setIconAttr($fieldValue, $data)
  14. {
  15. return FileService::setFileUrl($fieldValue);
  16. }
  17. static function getApiList($ids) : array
  18. {
  19. return static::withoutField([ 'delete_time', 'update_time' ])->order('id desc')->where('id', 'in', $ids)->select()->toArray();
  20. }
  21. }