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
703 B

<?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 $orderId
* @param array $imageIds 新的图片集
* @return array|false
*/
public static function updates(int $orderId, array $imageIds)
{
// 删除所有的sku记录
static::deleteAll(['order_id' => $orderId]);
// 批量写入商品图片记录
return static::increased($orderId, $imageIds);
}
}