issue #62
All checks were successful
Test CI / build (push) Successful in 1m19s

- 일정 관련 기능 구현 중
This commit is contained in:
2025-12-09 22:00:46 +09:00
parent abee778691
commit f451306c90
6 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import { IsArray, IsDate, IsString } from '@nestjs/class-validator';
export class CreateRequestDto {
@IsString()
name: string;
@IsDate()
startDate: Date;
@IsDate()
endDate: Date;
@IsString()
status: string;
@IsString()
content: string;
@IsString()
type: string;
@IsString()
style: string;
@IsString()
startTime: string;
@IsString()
endTime: string;
@IsString()
dayList: string;
@IsArray()
participantList: string[];
}

View File

View File

@@ -0,0 +1,43 @@
import { Inject, Injectable } from '@nestjs/common';
import * as schema from 'drizzle/schema';
import { countDistinct, and, eq } from 'drizzle-orm';
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
@Injectable()
export class ScheduleRepo {
constructor(@Inject('DRIZZLE') private readonly db: NodePgDatabase<typeof schema>) {}
async getList(accountId: string) {
const result = await this
.db
.select()
.from(schema.schedule)
.where(
and(
eq(schema.schedule.owner, accountId),
eq(schema.schedule.isDeleted, false)
)
);
return result;
}
async getDetail(id: string) {
const result = await this
.db
.select()
.from(schema.schedule)
.where(
and(
eq(schema.schedule.id, id),
eq(schema.schedule.isDeleted, false)
)
);
return result[0];
}
async create() {
}
}

View File