Files
MrleeAdmin/backend/app/adminapi/schema/request/system/FeedbackFormRequest.php
T
2026-08-31 11:33:59 +08:00

38 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
namespace app\adminapi\schema\request\system;
use app\schema\request\BaseFormRequest;
use OpenApi\Attributes as OA;
use WebmanTech\DTO\Attributes\ValidationRules;
#[OA\Schema(title: '问题反馈表单', description: '问题反馈创建和编辑参数')]
class FeedbackFormRequest extends BaseFormRequest
{
#[OA\Property(property: 'type', description: '反馈类型', type: 'string', enum: ['bug', 'suggestion', 'correction'], example: 'bug')]
#[ValidationRules(rules: 'required|string|in:bug,suggestion,correction')]
public string $type;
#[OA\Property(property: 'content', description: '问题描述', type: 'string', example: '扫码后页面提示请求失败')]
#[ValidationRules(rules: 'required|string|max:2000')]
public string $content;
#[OA\Property(property: 'contact', description: '联系方式', type: 'string', example: 'user@example.com', nullable: true)]
#[ValidationRules(rules: 'nullable|string|max:100')]
public ?string $contact = null;
#[OA\Property(property: 'images', description: '截图附件地址数组', type: 'array', items: new OA\Items(type: 'string'), nullable: true)]
#[ValidationRules(rules: 'nullable|array')]
public ?array $images = null;
#[OA\Property(property: 'source', description: '反馈来源', type: 'string', enum: ['app', 'web'], example: 'app')]
#[ValidationRules(rules: 'required|string|in:app,web')]
public string $source;
#[OA\Property(property: 'reply_content', description: '管理员回复内容', type: 'string', nullable: true)]
#[ValidationRules(rules: 'nullable|string|max:2000')]
public ?string $reply_content = null;
}