feat(api): add community endpoints
This commit is contained in:
1 parent
caf517123b
commit
6cd213a462
5 files changed
+366
No files matched your search
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
|
||||
@IsOptional()
|
||||
@ValidateNested()
|
||||
@Type(() => CreateCommunityOwnerDto)
|
||||
owner?: CreateCommunityOwnerDto;
|
||||
}
|
||||
Reference in new issue
Block a user