m
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
export declare class CaptchaQueryDto {
|
||||
type?: 'text' | 'math';
|
||||
size?: number;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
+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
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"captcha-query.dto.js","sourceRoot":"","sources":["../../../../src/app/common/dto/captcha-query.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,gFAAkE;AAClE,qDAA0D;AAC1D,6CAAsD;AACtD,yDAAyC;AAEzC,MAAa,eAAe;IAQ1B,IAAI,GAAqB,MAAM,CAAC;IAMhC,IAAI,CAAU;;qFAPR,CAAC,MAAM,EAAE,MAAM,CAAC;;CAQvB;AAfD,0CAeC;AAPC;IAPC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM;KAChB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;6CACS;AAMhC;IAJC,IAAA,oCAAW,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC9D,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;;6CACM"}
|
||||
{"version":3,"file":"captcha-query.dto.js","sourceRoot":"","sources":["../../../../src/app/common/dto/captcha-query.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,gFAAkE;AAClE,qDAA8D;AAC9D,yDAAyC;AAEzC,MAAa,eAAe;IAK1B,IAAI,CAAU;IAKd,KAAK,CAAU;;;;CAChB;AAXD,0CAWC;AANC;IAJC,IAAA,oCAAW,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC9D,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;;6CACM;AAKd;IAHC,IAAA,oCAAW,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAClD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8CACI"}
|
||||
Reference in New Issue
Block a user