feat(api): add community endpoints

This commit is contained in:
dahyeon committed 2026-04-13 01:12:00 +09:00
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;
}
@@ -0,0 +1,6 @@
import { IsMongoId } from 'class-validator';
export class TransferOwnershipDto {
@IsMongoId()
newOwnerUserId!: string;
}