diff --git a/src/main.ts b/src/main.ts index b1cc409..b861fd3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -45,7 +45,7 @@ async function bootstrap() { app.register(fastifyCookie, { secret: process.env.JWT_SECRET }); - // await app.listen(process.env.PORT ?? 3000, '0.0.0.0', () => { process.env.NODE_ENV !== 'prod' && console.log(`servier is running on ${process.env.PORT}`) }); - await app.listen(process.env.PORT || 3000, () => { process.env.NODE_ENV !== 'prod' && console.log(`service is running on ${process.env.PORT}`)}); + await app.listen(process.env.PORT ?? 3000, '0.0.0.0', () => { process.env.NODE_ENV !== 'prod' && console.log(`servier is running on ${process.env.PORT}`) }); + // await app.listen(process.env.PORT || 3000, () => { process.env.NODE_ENV !== 'prod' && console.log(`service is running on ${process.env.PORT}`)}); } bootstrap(); diff --git a/src/modules/schedule/dto/detail/detail-response.dto.ts b/src/modules/schedule/dto/detail/detail-response.dto.ts new file mode 100644 index 0000000..5b242de --- /dev/null +++ b/src/modules/schedule/dto/detail/detail-response.dto.ts @@ -0,0 +1,23 @@ +import { BaseResponseDto } from "src/common/dto/base-response.dto"; + +class ScheduleDetail { + id: string; + name: string; + startDate: Date; + endDate: Date; + status: string; + content?: string | null; + isDeleted: boolean; + type: string; + createdAt: string | null; + owner: string; + style: string; + startTime: string; + endTime: string; + dayList?: string | null; + participantList?: string[] | null; +} + +export class DetailResponseDto extends BaseResponseDto { + data?: ScheduleDetail | null; +} \ No newline at end of file diff --git a/src/modules/schedule/dto/list/list-request.dto.ts b/src/modules/schedule/dto/list/list-request.dto.ts new file mode 100644 index 0000000..f6ae775 --- /dev/null +++ b/src/modules/schedule/dto/list/list-request.dto.ts @@ -0,0 +1,21 @@ +import { IsArray, IsDateString, IsString } from "@nestjs/class-validator"; + +export class ListRequestDto { + @IsDateString() + startDate?: string; + + @IsDateString() + endDate?: string; + + @IsArray() + styleList?: string[]; + + @IsArray() + typeList?: string[]; + + @IsString() + status?: 'yet' | 'completed' | undefined; + + @IsString() + name?: string; +} \ No newline at end of file diff --git a/src/modules/schedule/dto/list/list-response.dto.ts b/src/modules/schedule/dto/list/list-response.dto.ts new file mode 100644 index 0000000..7eaf8a0 --- /dev/null +++ b/src/modules/schedule/dto/list/list-response.dto.ts @@ -0,0 +1,15 @@ +import { BaseResponseDto } from "src/common/dto/base-response.dto"; + +class ScheduleList { + name: string; + id: string; + startDate: Date; + endDate: Date; + type: string; + style: string; + status: string; +} + +export class ListResponseDto extends BaseResponseDto { + data: ScheduleList[]; +} \ No newline at end of file