Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: update CreateAgendaInput
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Feb 3, 2020
1 parent cde6494 commit 19263d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ type BestAlbumModel {
input CreateAgendaInput {
title: String!
startDate: String!
allDay: Boolean!
endDate: String
rRule: String
exDate: String
Expand Down
10 changes: 9 additions & 1 deletion src/agenda/dtos/create-agenda.input.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InputType, Field } from 'type-graphql'
import { IsString, IsNotEmpty, IsDateString } from 'class-validator'
import { IsString, IsNotEmpty, IsDateString, IsBoolean } from 'class-validator'

@InputType()
export class CreateAgendaInput {
Expand All @@ -13,6 +13,14 @@ export class CreateAgendaInput {
@IsNotEmpty()
public readonly startDate: string

@Field()
@IsBoolean()
public readonly allDay: boolean

@Field()
@IsString()
public readonly notes: boolean

@Field({ nullable: true })
public readonly endDate?: string

Expand Down

0 comments on commit 19263d1

Please sign in to comment.