calendar fixes
This commit is contained in:
parent
136da08b70
commit
8c597fd68d
8 changed files with 70 additions and 27 deletions
|
@ -1,22 +1,24 @@
|
|||
export interface CreateCalendarCommand {
|
||||
date: Date;
|
||||
starttime: Date;
|
||||
endtime: Date;
|
||||
title: string;
|
||||
content: string;
|
||||
location: string;
|
||||
allDay: boolean;
|
||||
typeId: number;
|
||||
}
|
||||
|
||||
export interface UpdateCalendarCommand {
|
||||
id: number;
|
||||
date: Date;
|
||||
id: string;
|
||||
starttime: Date;
|
||||
endtime: Date;
|
||||
title: string;
|
||||
content: string;
|
||||
location: string;
|
||||
allDay: boolean;
|
||||
typeId: number;
|
||||
}
|
||||
|
||||
export interface DeleteCalendarCommand {
|
||||
id: number;
|
||||
id: string;
|
||||
}
|
||||
|
|
|
@ -16,11 +16,12 @@ export default abstract class CalendarCommandHandler {
|
|||
.insert()
|
||||
.into(calendar)
|
||||
.values({
|
||||
date: createCalendar.date,
|
||||
starttime: createCalendar.starttime,
|
||||
endtime: createCalendar.endtime,
|
||||
title: createCalendar.title,
|
||||
content: createCalendar.content,
|
||||
location: createCalendar.location,
|
||||
allDay: createCalendar.allDay,
|
||||
type: await dataSource
|
||||
.getRepository(calendarType)
|
||||
.createQueryBuilder("type")
|
||||
|
@ -46,11 +47,12 @@ export default abstract class CalendarCommandHandler {
|
|||
.createQueryBuilder()
|
||||
.update(calendar)
|
||||
.set({
|
||||
date: updateCalendar.date,
|
||||
starttime: updateCalendar.starttime,
|
||||
endtime: updateCalendar.endtime,
|
||||
title: updateCalendar.title,
|
||||
content: updateCalendar.content,
|
||||
location: updateCalendar.location,
|
||||
allDay: updateCalendar.allDay,
|
||||
type: await dataSource
|
||||
.getRepository(calendarType)
|
||||
.createQueryBuilder("type")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue