/**
 * Test fixtures for common data structures
 */

import { randomUUID } from 'crypto';

export function createTestUser(overrides?: Partial<{ id: string; email: string; name: string }>) {
  return {
    id: randomUUID(),
    email: 'test@example.com',
    name: 'Test User',
    createdAt: new Date(),
    updatedAt: new Date(),
    ...overrides,
  };
}

export function createTestDocument(overrides?: Partial<{ id: string; title: string; type: string }>) {
  return {
    id: randomUUID(),
    title: 'Test Document',
    type: 'legal',
    content: 'Test content',
    fileUrl: 'https://example.com/document.pdf',
    createdAt: new Date(),
    updatedAt: new Date(),
    ...overrides,
  };
}

export function createTestDeal(overrides?: Partial<{ id: string; name: string; status: string }>) {
  return {
    id: randomUUID(),
    name: 'Test Deal',
    status: 'draft',
    dataroomId: randomUUID(),
    createdAt: new Date(),
    updatedAt: new Date(),
    ...overrides,
  };
}

export function createTestPayment(overrides?: Partial<{ id: string; amount: number; currency: string }>) {
  return {
    id: randomUUID(),
    amount: 1000,
    currency: 'USD',
    status: 'pending',
    paymentMethod: 'credit_card',
    createdAt: new Date(),
    updatedAt: new Date(),
    ...overrides,
  };
}

export function createTestLedgerEntry(overrides?: Partial<{ id: string; accountId: string; type: string; amount: number }>) {
  return {
    id: randomUUID(),
    accountId: randomUUID(),
    type: 'debit',
    amount: 100,
    currency: 'USD',
    description: 'Test entry',
    createdAt: new Date(),
    ...overrides,
  };
}

