mirror of
https://github.com/docmost/docmost.git
synced 2025-11-21 10:11:08 +10:00
feat: spaces - WIP
This commit is contained in:
12
apps/server/src/core/space/dto/create-space.dto.ts
Normal file
12
apps/server/src/core/space/dto/create-space.dto.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { IsOptional, IsString, MaxLength, MinLength } from 'class-validator';
|
||||
|
||||
export class CreateSpaceDto {
|
||||
@MinLength(4)
|
||||
@MaxLength(64)
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
}
|
||||
6
apps/server/src/core/space/dto/delete-space.dto.ts
Normal file
6
apps/server/src/core/space/dto/delete-space.dto.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { IsString } from 'class-validator';
|
||||
|
||||
export class DeleteSpaceDto {
|
||||
@IsString()
|
||||
spaceId: string;
|
||||
}
|
||||
4
apps/server/src/core/space/dto/update-space.dto.ts
Normal file
4
apps/server/src/core/space/dto/update-space.dto.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateSpaceDto } from './create-space.dto';
|
||||
|
||||
export class UpdateSpaceDto extends PartialType(CreateSpaceDto) {}
|
||||
Reference in New Issue
Block a user