feat: 开放API授权相关

This commit is contained in:
2025-05-20 14:40:39 +08:00
parent a7b752636d
commit 1d723b31a5
16 changed files with 577 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
<?php
declare (strict_types = 1);
namespace app\openapi\model;
use think\Model;
/**
* @mixin \think\Model
*/
class OAuthClientModel extends Model
{
// 表名
protected $name = 'oauth_client';
// 字段信息
protected $schema = [
'id' => 'int',
'client_id' => 'string',
'client_secret' => 'string',
'redirect_uri' => 'string',
'enabled' => 'int',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime'
];
// client_id范围查询
public function scopeClientId($query, $client_id)
{
$query->where('client_id', '=', $client_id);
}
}