ohmyform-api/src/dto/form/button.model.ts
Michael Schramm 414bc04782 updates
2020-05-29 17:09:19 +02:00

28 lines
585 B
TypeScript

import { Field, ObjectType } from '@nestjs/graphql';
@ObjectType('Button')
export class ButtonModel {
@Field({ nullable: true })
readonly url?: string
@Field({ nullable: true })
readonly action?: string
@Field({ nullable: true })
readonly text?: string
@Field({ nullable: true })
readonly bgColor?: string
@Field({ nullable: true })
readonly color?: string
constructor(button: Partial<ButtonModel>) {
this.url = button.url
this.action = button.action
this.text = button.text
this.bgColor = button.bgColor
this.color = button.color
}
}