1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00
course-tencent-cloud/app/Caches/UserDailyCounter.php
2023-12-25 20:18:27 +08:00

45 lines
1012 B
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Caches;
class UserDailyCounter extends Counter
{
public function getLifetime()
{
$tomorrow = strtotime('tomorrow');
return $tomorrow - time();
}
public function getKey($id = null)
{
return "user_daily_counter:{$id}";
}
public function getContent($id = null)
{
return [
'article_count' => 0,
'question_count' => 0,
'answer_count' => 0,
'comment_count' => 0,
'consult_count' => 0,
'order_count' => 0,
'chapter_like_count' => 0,
'consult_like_count' => 0,
'review_like_count' => 0,
'article_like_count' => 0,
'question_like_count' => 0,
'answer_like_count' => 0,
'comment_like_count' => 0,
];
}
}