import { IsString, IsNumber, IsOptional } from 'class-validator';
import { Expose } from '@nestjs/class-transformer';
import { Optional } from '@nestjs/common';

export class CreateMessageDto {
  @IsOptional()
  @IsString()
  @Expose()
  name?: string;

  @IsOptional()
  @IsString()
  @Expose()
  message?: string | string[];

  @IsNumber()
  @Expose()
  time: number;

  @IsNumber()
  @Expose()
  @Optional()
  date_time: number;

  @IsOptional()
  @IsString()
  @Expose()
  room_id?: string;

  @IsOptional()
  @IsString()
  @Expose()
  room_name?: string;
}
