import { IsBoolean, IsString } from 'class-validator';
import { locales } from './LocaleEnum';
import { MailTypes } from './MailTypeEnum';

/**
 * Simple success response class to make everyone happy :)
 */
export class SuccessResponse {

    @IsBoolean()
    success: boolean = true;

    @IsString()
    message: string = "Sent!"

    @IsString()
    locale: locales;

    @IsString()
    type: MailTypes;

    constructor(type: MailTypes, locale?: locales) {
        this.type = type;
        this.locale = locale || locales.en;
    }
}