103 lines
3.8 KiB
JavaScript
103 lines
3.8 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.SetAdminActiveDto = exports.UpdateAdminUserDto = exports.CreateAdminUserDto = void 0;
|
||
|
|
const class_validator_1 = require("class-validator");
|
||
|
|
const client_1 = require("@prisma/client");
|
||
|
|
class CreateAdminUserDto {
|
||
|
|
fullName;
|
||
|
|
phone;
|
||
|
|
email;
|
||
|
|
password;
|
||
|
|
role;
|
||
|
|
isActive;
|
||
|
|
}
|
||
|
|
exports.CreateAdminUserDto = CreateAdminUserDto;
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsString)(),
|
||
|
|
(0, class_validator_1.MinLength)(1),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], CreateAdminUserDto.prototype, "fullName", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsString)(),
|
||
|
|
(0, class_validator_1.MinLength)(10),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], CreateAdminUserDto.prototype, "phone", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsEmail)(),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], CreateAdminUserDto.prototype, "email", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsString)(),
|
||
|
|
(0, class_validator_1.MinLength)(4),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], CreateAdminUserDto.prototype, "password", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsEnum)(client_1.AdminRole),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], CreateAdminUserDto.prototype, "role", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsBoolean)(),
|
||
|
|
__metadata("design:type", Boolean)
|
||
|
|
], CreateAdminUserDto.prototype, "isActive", void 0);
|
||
|
|
class UpdateAdminUserDto {
|
||
|
|
fullName;
|
||
|
|
phone;
|
||
|
|
email;
|
||
|
|
password;
|
||
|
|
role;
|
||
|
|
isActive;
|
||
|
|
}
|
||
|
|
exports.UpdateAdminUserDto = UpdateAdminUserDto;
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsString)(),
|
||
|
|
(0, class_validator_1.MinLength)(1),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], UpdateAdminUserDto.prototype, "fullName", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsString)(),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], UpdateAdminUserDto.prototype, "phone", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsEmail)(),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], UpdateAdminUserDto.prototype, "email", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsString)(),
|
||
|
|
(0, class_validator_1.MinLength)(4),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], UpdateAdminUserDto.prototype, "password", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsEnum)(client_1.AdminRole),
|
||
|
|
__metadata("design:type", String)
|
||
|
|
], UpdateAdminUserDto.prototype, "role", void 0);
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsOptional)(),
|
||
|
|
(0, class_validator_1.IsBoolean)(),
|
||
|
|
__metadata("design:type", Boolean)
|
||
|
|
], UpdateAdminUserDto.prototype, "isActive", void 0);
|
||
|
|
class SetAdminActiveDto {
|
||
|
|
isActive;
|
||
|
|
}
|
||
|
|
exports.SetAdminActiveDto = SetAdminActiveDto;
|
||
|
|
__decorate([
|
||
|
|
(0, class_validator_1.IsBoolean)(),
|
||
|
|
__metadata("design:type", Boolean)
|
||
|
|
], SetAdminActiveDto.prototype, "isActive", void 0);
|
||
|
|
//# sourceMappingURL=admin-user.dto.js.map
|