.
This commit is contained in:
1 parent
a197185ad0
commit
30dfb7ce58
27 files changed
+1584
-45
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
IsOptional,
|
||||
IsString,
|
||||
MaxLength,
|
||||
MinLength,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
|
||||
class CreateCommunityOwnerDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(64)
|
||||
kakaoTalkId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(64)
|
||||
kakaoTalkNickname?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(64)
|
||||
discordId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(64)
|
||||
discordNickname?: string;
|
||||
}
|
||||
|
||||
export class CreateCommunityDto {
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
@MaxLength(64)
|
||||
name!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(1024)
|
||||
description?: string;
|
||||
|
||||
@ValidateNested()
|
||||
@Type(() => CreateCommunityOwnerDto)
|
||||
owner!: CreateCommunityOwnerDto;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { IsMongoId } from 'class-validator';
|
||||
|
||||
export class TransferOwnershipDto {
|
||||
@IsMongoId()
|
||||
newOwnerUserId!: string;
|
||||
}
|
||||
Reference in new issue
Block a user