import { IsString, Length, Matches } from 'class-validator';

export class SendCafeCompanionMessageDto {
  @IsString({ message: '会话ID必须是字符串' })
  @Length(1, 120, { message: '会话ID长度需在1-120字符之间' })
  @Matches(/^[A-Za-z0-9_:-]+$/, { message: '会话ID格式不正确' })
  session_id!: string;

  @IsString({ message: '消息内容必须是字符串' })
  @Length(1, 1200, { message: '消息内容长度需在1-1200字符之间' })
  content!: string;
}
