import { type DomainEvent } from '@modules/shared';
import type { MessageType } from '../value-objects/message-type.vo';

export class MessageSentEvent implements DomainEvent {
  readonly eventName = 'message.sent';
  readonly occurredAt = new Date();

  constructor(
    public readonly aggregateId: string,
    public readonly conversationId: string,
    public readonly senderId: string,
    public readonly type: MessageType,
    public readonly content: string,
  ) {}

  get messageId(): string {
    return this.aggregateId;
  }
}
