feat: Added methods for organization
This commit is contained in:
23
src/organization-membership/dto/org-request-action.dto.ts
Normal file
23
src/organization-membership/dto/org-request-action.dto.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"
|
||||
import { IsEnum, IsNotEmpty, IsOptional, IsString } from "class-validator"
|
||||
import { USER_ORG_ACCEPT_REJECT_ACTION } from "../constants"
|
||||
|
||||
export class UserOrganizationRequestActionRequestDTO {
|
||||
@ApiProperty({
|
||||
description: 'Action',
|
||||
example: USER_ORG_ACCEPT_REJECT_ACTION.ACCEPT,
|
||||
type: 'string',
|
||||
})
|
||||
@IsEnum(USER_ORG_ACCEPT_REJECT_ACTION)
|
||||
@IsNotEmpty()
|
||||
action: USER_ORG_ACCEPT_REJECT_ACTION
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Message(reject reason)',
|
||||
example: 'Bad sry or smth',
|
||||
type: 'string',
|
||||
})
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
message?: string
|
||||
}
|
||||
Reference in New Issue
Block a user