Files
2026-04-21 22:34:39 +08:00

84 lines
3.7 KiB
JavaScript

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegisterDto = exports.LoginDto = void 0;
const openapi = require("@nestjs/swagger");
const swagger_1 = require("@nestjs/swagger");
const class_validator_1 = require("class-validator");
class LoginDto {
phone;
password;
captchaKey;
captchaCode;
static _OPENAPI_METADATA_FACTORY() {
return { phone: { required: true, type: () => String }, password: { required: true, type: () => String }, captchaKey: { required: false, type: () => String }, captchaCode: { required: false, type: () => String } };
}
}
exports.LoginDto = LoginDto;
__decorate([
(0, swagger_1.ApiProperty)({ description: '手机号' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], LoginDto.prototype, "phone", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: '密码' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], LoginDto.prototype, "password", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: '验证码 key' }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], LoginDto.prototype, "captchaKey", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: '验证码' }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], LoginDto.prototype, "captchaCode", void 0);
class RegisterDto {
phone;
password;
inviteCode;
captchaKey;
captchaCode;
static _OPENAPI_METADATA_FACTORY() {
return { phone: { required: true, type: () => String }, password: { required: true, type: () => String }, inviteCode: { required: true, type: () => String }, captchaKey: { required: true, type: () => String }, captchaCode: { required: true, type: () => String } };
}
}
exports.RegisterDto = RegisterDto;
__decorate([
(0, swagger_1.ApiProperty)({ description: '手机号' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RegisterDto.prototype, "phone", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: '密码' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RegisterDto.prototype, "password", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: '邀请码' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RegisterDto.prototype, "inviteCode", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: '验证码 key' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RegisterDto.prototype, "captchaKey", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: '验证码' }),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RegisterDto.prototype, "captchaCode", void 0);
//# sourceMappingURL=auth.dto.js.map