m
This commit is contained in:
+8
-13
@@ -13,26 +13,15 @@ exports.CaptchaQueryDto = void 0;
|
||||
const openapi = require("@nestjs/swagger");
|
||||
const api_optional_decorator_1 = require("../decorator/api_optional.decorator");
|
||||
const class_validator_1 = require("class-validator");
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const class_transformer_1 = require("class-transformer");
|
||||
class CaptchaQueryDto {
|
||||
type = 'text';
|
||||
size;
|
||||
color;
|
||||
static _OPENAPI_METADATA_FACTORY() {
|
||||
return { type: { required: false, type: () => Object, default: "text", enum: ['text', 'math'] }, size: { required: false, type: () => Number } };
|
||||
return { size: { required: false, type: () => Number }, color: { required: false, type: () => String } };
|
||||
}
|
||||
}
|
||||
exports.CaptchaQueryDto = CaptchaQueryDto;
|
||||
__decorate([
|
||||
(0, swagger_1.ApiPropertyOptional)({
|
||||
description: '验证码类型:text=文本验证码,math=数学验证码',
|
||||
enum: ['text', 'math'],
|
||||
default: 'text',
|
||||
}),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsIn)(['text', 'math']),
|
||||
__metadata("design:type", String)
|
||||
], CaptchaQueryDto.prototype, "type", void 0);
|
||||
__decorate([
|
||||
(0, api_optional_decorator_1.ApiOptional)({ description: '验证码长度(仅 text 类型有效)', default: 4 }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
@@ -40,4 +29,10 @@ __decorate([
|
||||
(0, class_validator_1.IsInt)(),
|
||||
__metadata("design:type", Number)
|
||||
], CaptchaQueryDto.prototype, "size", void 0);
|
||||
__decorate([
|
||||
(0, api_optional_decorator_1.ApiOptional)({ description: '验证码颜色,16进制:#ff0000' }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CaptchaQueryDto.prototype, "color", void 0);
|
||||
//# sourceMappingURL=captcha-query.dto.js.map
|
||||
Reference in New Issue
Block a user