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.
 
 

45 lines
1000 B

<?php
declare (strict_types=1);
namespace App\Model\v3;
use App\Constants\v3\OssThumbnail;
use App\Model\Model;
use App\Service\v3\Interfaces\AttachmentServiceInterface;
use Hyperf\Database\Model\SoftDeletes;
use Hyperf\Di\Annotation\Inject;
class ServicePersonnel extends Model
{
use SoftDeletes;
/**
* @Inject
* @var AttachmentServiceInterface
*/
protected $attachmentService;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'lanzu_service_personnel';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
// protected $casts = [
// 'set_reward' => 'array'
// ];
public function getHeadUrlAttribute($value)
{
return $this->attachmentService->switchImgToAliOss($value, OssThumbnail::THUMBNAIL_600_Q90);
}
}