import { ObjectId } from "mongodb";

export interface User {
  _id?: ObjectId;
  username: string;
  password: string;
  email?: string;
  role?: "user" | "admin";
  createdAt: Date;
  updatedAt: Date;
}

export interface Transaction {
  _id?: ObjectId;
  userId: ObjectId;
  amount: number;
  type: "income" | "expense";
  categoryId: ObjectId;
  description: string;
  date: Date;
  createdAt: Date;
  updatedAt: Date;
}

export interface Category {
  _id?: ObjectId;
  name: string;
  userId: ObjectId;
  icon?: string;
  color?: string;
  createdAt: Date;
  updatedAt: Date;
}
