Template base para proyectos SaaS multi-tenant. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React/Vite) - apps/database (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
80 lines
3.5 KiB
JavaScript
80 lines
3.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.AssignRoleDto = exports.UpdateRoleDto = exports.CreateRoleDto = void 0;
|
|
const class_validator_1 = require("class-validator");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
class CreateRoleDto {
|
|
}
|
|
exports.CreateRoleDto = CreateRoleDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ example: 'Manager' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
__metadata("design:type", String)
|
|
], CreateRoleDto.prototype, "name", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ example: 'manager' }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
__metadata("design:type", String)
|
|
], CreateRoleDto.prototype, "code", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ example: 'Can manage team members' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], CreateRoleDto.prototype, "description", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ type: [String], example: ['users:read', 'users:write'] }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsArray)(),
|
|
(0, class_validator_1.IsString)({ each: true }),
|
|
__metadata("design:type", Array)
|
|
], CreateRoleDto.prototype, "permissions", void 0);
|
|
class UpdateRoleDto {
|
|
}
|
|
exports.UpdateRoleDto = UpdateRoleDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ example: 'Manager' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UpdateRoleDto.prototype, "name", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ example: 'Can manage team members' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UpdateRoleDto.prototype, "description", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ type: [String] }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsArray)(),
|
|
(0, class_validator_1.IsString)({ each: true }),
|
|
__metadata("design:type", Array)
|
|
], UpdateRoleDto.prototype, "permissions", void 0);
|
|
class AssignRoleDto {
|
|
}
|
|
exports.AssignRoleDto = AssignRoleDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ example: '550e8400-e29b-41d4-a716-446655440000' }),
|
|
(0, class_validator_1.IsUUID)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
__metadata("design:type", String)
|
|
], AssignRoleDto.prototype, "userId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ example: '550e8400-e29b-41d4-a716-446655440001' }),
|
|
(0, class_validator_1.IsUUID)(),
|
|
(0, class_validator_1.IsNotEmpty)(),
|
|
__metadata("design:type", String)
|
|
], AssignRoleDto.prototype, "roleId", void 0);
|
|
//# sourceMappingURL=create-role.dto.js.map
|