update openapi
This commit is contained in:
@@ -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
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user