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/Comment.php

32 lines
526 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\store\model;
use app\common\model\Comment as CommentModel;
/**
* 商品评价模型
* Class Comment
* @package app\store\model
*/
class Comment extends CommentModel
{
/**
* 软删除
* @return false|int
*/
public function setDelete()
{
return $this->save(['is_delete' => 1]);
}
/**
* 获取评价总数量
* @return int|string
*/
public function getCommentTotal()
{
return $this->where(['is_delete' => 0])->count();
}
}