Skip to content
Snippets Groups Projects
email.ts 773 B
Newer Older
  • Learn to ignore specific revisions
  • import { IsDefined } from 'class-validator';
    import { ApiModelProperty, ApiModelPropertyOptional } from '@nestjs/swagger';
    
    
    export class ContactForm {
    
      @ApiModelProperty()
      @IsDefined()
      from: string;
    
      @ApiModelProperty()
      @IsDefined()
      subject: string;
    
      @ApiModelProperty()
      @IsDefined()
      firstname: string;
    
      @ApiModelProperty()
      @IsDefined()
      lastname: string;
    
      @ApiModelProperty()
      @IsDefined()
      text: string;
    }
    
    
    export class Email {
    
      @ApiModelProperty()
      @IsDefined()
      to: string[];
    
      @ApiModelProperty()
      @IsDefined()
      from: string;
    
      @ApiModelPropertyOptional()
      cc: string[];
    
      @ApiModelPropertyOptional()
      bcc: string[];
    
      @ApiModelProperty()
      @IsDefined()
      subject: string;
    
      @ApiModelProperty()
      @IsDefined()
      text: string;