101 lines
4.5 KiB
JavaScript
101 lines
4.5 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.UserUpdateUserProfileDto = exports.UserCreateRedPacketDto = exports.UserRedPacketDetailDto = exports.UserInfoDto = exports.UserLikeDto = void 0;
|
|
const openapi = require("@nestjs/swagger");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const class_validator_1 = require("class-validator");
|
|
const api_optional_decorator_1 = require("../../common/decorator/api_optional.decorator");
|
|
const is_number_or_number_str_1 = require("../../common/decorator/is_number_or_number_str");
|
|
const red_packet_model_1 = require("../../../model/red_packet.model");
|
|
const user_model_1 = require("../../../model/user.model");
|
|
class UserLikeDto {
|
|
keyword;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { keyword: { required: true, type: () => String } };
|
|
}
|
|
}
|
|
exports.UserLikeDto = UserLikeDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '搜索关键词' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UserLikeDto.prototype, "keyword", void 0);
|
|
class UserInfoDto extends (0, swagger_1.PickType)(user_model_1.UserModel, ['id']) {
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return {};
|
|
}
|
|
}
|
|
exports.UserInfoDto = UserInfoDto;
|
|
class UserRedPacketDetailDto {
|
|
id;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { id: { required: true, type: () => Number } };
|
|
}
|
|
}
|
|
exports.UserRedPacketDetailDto = UserRedPacketDetailDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '红包ID' }),
|
|
(0, is_number_or_number_str_1.IsNumberOrNumberStr)(),
|
|
__metadata("design:type", Number)
|
|
], UserRedPacketDetailDto.prototype, "id", void 0);
|
|
class UserCreateRedPacketDto extends (0, swagger_1.PickType)(red_packet_model_1.RedPacketModel, [
|
|
'type',
|
|
'groupId',
|
|
]) {
|
|
amount;
|
|
claimedUserId;
|
|
count;
|
|
password;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { amount: { required: true, type: () => String }, claimedUserId: { required: true, type: () => String }, count: { required: true, type: () => Number }, password: { required: true, type: () => String } };
|
|
}
|
|
}
|
|
exports.UserCreateRedPacketDto = UserCreateRedPacketDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '红包金额' }),
|
|
(0, class_validator_1.IsDecimal)(),
|
|
__metadata("design:type", String)
|
|
], UserCreateRedPacketDto.prototype, "amount", void 0);
|
|
__decorate([
|
|
(0, api_optional_decorator_1.ApiOptional)({ description: '可以领取的IM用户ID' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UserCreateRedPacketDto.prototype, "claimedUserId", void 0);
|
|
__decorate([
|
|
(0, api_optional_decorator_1.ApiOptional)({ description: '红包数量,拼手气红包比传' }),
|
|
(0, class_validator_1.IsInt)(),
|
|
__metadata("design:type", Number)
|
|
], UserCreateRedPacketDto.prototype, "count", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '支付密码' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UserCreateRedPacketDto.prototype, "password", void 0);
|
|
class UserUpdateUserProfileDto {
|
|
nick;
|
|
avatar;
|
|
static _OPENAPI_METADATA_FACTORY() {
|
|
return { nick: { required: true, type: () => String }, avatar: { required: true, type: () => String } };
|
|
}
|
|
}
|
|
exports.UserUpdateUserProfileDto = UserUpdateUserProfileDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '昵称' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UserUpdateUserProfileDto.prototype, "nick", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: '头像' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UserUpdateUserProfileDto.prototype, "avatar", void 0);
|
|
//# sourceMappingURL=user_im.dto.js.map
|