This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/store/model/sharp/ActiveGoods.php

33 lines
694 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\store\model\sharp;
use app\common\model\sharp\ActiveGoods as ActiveGoodsModel;
use app\store\model\sharp\Goods as GoodsModel;
/**
* 整点秒杀-活动会场与商品关联模型
* Class ActiveGoods
* @package app\store\model\sharp
*/
class ActiveGoods extends ActiveGoodsModel
{
/**
* 获取秒杀商品模型
* @return Goods
*/
protected function getGoodsModel()
{
return new GoodsModel;
}
/**
* 同步删除活动会场与商品关联记录
* @param $sharpGoodsId
*/
public function onDeleteSharpGoods($sharpGoodsId)
{
$this->where('sharp_goods_id', '=', $sharpGoodsId)->delete();
}
}