update openapi

This commit is contained in:
2026-03-06 16:55:46 +08:00
parent d00af8372c
commit 4b10572794
3 changed files with 74 additions and 1 deletions
+15
View File
@@ -6,6 +6,7 @@ namespace App\Model;
use Hyperf\Database\Model\Relations\HasMany;
use Hyperf\DbConnection\Model\Model;
use OpenApi\Attributes as OA;
use Qbhy\HyperfAuth\Authenticatable;
/**
@@ -20,6 +21,20 @@ use Qbhy\HyperfAuth\Authenticatable;
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*/
#[OA\Schema(
schema: 'User',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'username', type: 'string', example: 'user_1234'),
new OA\Property(property: 'email', type: 'string', example: 'user@example.com'),
new OA\Property(property: 'status', type: 'integer', example: 1),
new OA\Property(property: 'ext', type: 'object', nullable: true, example: ['nickname' => 'user']),
new OA\Property(property: 'refresh_token_expires_at', type: 'string', format: 'date-time', nullable: true),
new OA\Property(property: 'created_at', type: 'string', format: 'date-time'),
new OA\Property(property: 'updated_at', type: 'string', format: 'date-time'),
]
)]
class User extends Model implements Authenticatable
{
/**