export interface User {
  id: string;
  username: string;
  email?: string;
  name?: string;
  image?: string;
  balance?: number;
  createdAt: Date;
  updatedAt: Date;
}

export interface Session {
  user: User;
  session: {
    id: string;
    userId: string;
    expiresAt: Date;
    token: string;
  };
}

export interface GenerationRecord {
  id: string;
  userId: string;
  type: 'image' | 'video' | 'text';
  title: string;
  description?: string;
  thumbnail?: string;
  mediaUrl?: string;
  status: 'pending' | 'completed' | 'failed';
  cost: number;
  createdAt: Date;
  updatedAt: Date;
}

export interface BalanceTransaction {
  id: string;
  userId: string;
  type: 'recharge' | 'consumption' | 'refund';
  amount: number;
  description: string;
  relatedRecordId?: string;
  createdAt: Date;
}

export interface AuthError {
  message: string;
  code?: string;
}
