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.
yanzong/app/api/model/RecoveryImage.php

32 lines
718 B

10 months ago
<?php
declare (strict_types=1);
namespace app\api\model;
use app\common\model\RecoveryImage as BaseRecoveryImage;
class RecoveryImage extends BaseRecoveryImage
{
/**
* 隐藏字段
* @var array
*/
protected $hidden = [
'store_id',
'create_time',
];
/**
* 更新关系记录
* @param int $recoveryId
* @param array $imageIds 新的图片集
* @return array|false
*/
public static function updates(int $recoveryId, array $imageIds)
{
// 删除所有的sku记录
10 months ago
static::deleteAll(['recovery_id' => $recoveryId]);
10 months ago
// 批量写入商品图片记录
return static::increased($recoveryId, $imageIds);
}
}