Files
mini_tp/app/api/model/ProductList.php
T
nepiedg 6b46767d86 refactor(member, auth): streamline product info retrieval and enhance dashboard statistics
- Updated `getProductInfo` method in `Member` model to use a unified model for fetching product data.
- Refactored `logLogin` method to utilize `MemberLoginLog` for logging login attempts.
- Introduced `getDashboardStats` method in `AuthService` to gather user-specific statistics, including remaining quotas and counts of authorized accounts, published tasks, and works.
- Added new database configuration for Douyin business statistics.
2026-04-02 07:09:29 +00:00

35 lines
789 B
PHP

<?php
declare(strict_types=1);
namespace app\api\model;
use think\Model;
/**
* 套餐模型(对应业务库 product_list 表)
*
* 该模型用于读取会员套餐配置,供登录态与首页工作台展示使用。
*/
class ProductList extends Model
{
// 套餐配置存放在业务库。
protected $connection = 'dbbiz';
// 对齐原系统 product_list 表。
protected $name = 'product_list';
// 当前项目仅做读取,不依赖自动时间戳。
protected $autoWriteTimestamp = false;
/**
* 按套餐类型获取套餐信息。
*
* @param int $vType 套餐类型
* @return self|null
*/
public static function findByVType(int $vType): ?self
{
return self::where('v_type', $vType)->find();
}
}