Index: prisma/schema.prisma
===================================================================
--- prisma/schema.prisma	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ prisma/schema.prisma	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -8,190 +8,120 @@
 }
 
-model Tenant {
-  id                String     @id @default(cuid())
-  name              String     @map("company_name")
-  email             String     @unique @map("company_email")
-  address           Json       @map("company_address")
-  bankAccounts      Json?      @map("company_bank_accounts")
-  logoUrl           String?    @map("company_logo_url")
-  phoneNumber       String?    @map("company_phone_number")
-  vatNumber         String?    @map("company_vat_number")
-  companyNumber     String?    @map("company_no")
-  representative    String     @map("company_representative")
-  lastInvoiceNumber String     @default("0") @map("company_last_invoice_number")
-  createdAt         DateTime   @default(now()) @map("created_at")
-  updatedAt         DateTime   @updatedAt @map("updated_at")
-  invoicesSent      Invoice[]
-  services          Service[]
-  employees         Employee[]
-  clients           Client[]
-  users             User[]
+model Customer {
+  id              String        @id @default(uuid())
+  companyId       String?       // Optional company identifier
+  name            String
+  email           String        @unique
+  address         Json
+  logoUrl         String?
+  phoneNumber     String?
+  vatNumber       String?
+  companyNumber   String?
+  representative  String
+  status          CustomerStatus @default(active)
+
+  bankAccounts    BankAccount[] // One-to-many relation
+  invoicesSent    Invoice[] @relation("InvoiceFrom")
+  invoicesReceived Invoice[] @relation("InvoiceTo")
 }
 
-model Client {
-  id             String       @id @default(uuid())
-  tenantId       String       @map("tenant_id")
-  name           String
-  email          String       @unique
-  address        Json
-  logoUrl        String?      @map("client_logo_url")
-  phoneNumber    String?      @map("client_phone_number")
-  vatNumber      String?      @map("client_vat")
-  companyNumber  String?      @map("client_company_no")
-  representative String       @map("client_representative")
-  status         ClientStatus @default(active) @map("client_status")
-  createdAt      DateTime     @default(now()) @map("created_at")
-  updatedAt      DateTime     @updatedAt @map("updated_at")
-
-  tenant           Tenant    @relation(fields: [tenantId], references: [id], onDelete: Cascade)
-  invoicesReceived Invoice[] @relation("InvoiceTo")
-
-  // Note: Advanced indexes (partial, functional, case-insensitive) 
-  // are handled via raw SQL in sql/02_client_email_index.sql
-
-  // Basic indexes that Prisma can handle
-  @@index([email]) // Basic email index
-  @@index([email, tenantId]) // Composite email + tenant index
-  @@index([status]) // Status index
-  @@index([tenantId]) // Tenant index for multi-tenant queries
+model BankAccount {
+  id             String   @id @default(uuid())
+  customerId     String
+  customer       Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
+  accountNumber  String?
+  bicSwift       String?
+  iban           String?
+  routingNumber  String?
+  currency       Currency
 }
 
 model Service {
-  id       String @id @default(uuid())
-  name     String
-  sprint   Float
-  hour     Float
-  month    Float
-  tenantId String @map("tenant_id")
-  tenant   Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
+  id          String  @id @default(uuid())
+  name        String
+  sprintPrice Float
+  hourPrice   Float
+  monthPrice  Float
 
-  lineItems LineItem[]
+  invoiceItems InvoiceItem[]
 }
 
 model Invoice {
-  id            String        @id @default(uuid())
-  sent          Int?
-  dueDate       DateTime      @map("invoice_due_date")
-  status        InvoiceStatus @map("invoice_status")
-  currency      Currency      @map("invoice_currency")
-  quantityType  QuantityType  @map("invoice_quantity_type")
-  subTotal      Float         @map("invoice_sub_total")
-  issueDate     DateTime      @map("invoice_issue_date")
-  month         Month         @map("invoice_month")
-  discount      Float?        @map("invoice_discount")
-  taxes         Float?        @map("invoice_taxes")
-  totalAmount   Float         @map("invoice_total_amount")
-  invoiceNumber String        @unique @map("invoice_number")
-  pdfRef        String?       @map("invoice_pdf_ref")
-  createdAt     DateTime      @default(now()) @map("created_at")
-  updatedAt     DateTime      @updatedAt @map("updated_at")
+  id            String         @id @default(uuid())
+  sent          Int?           // Number of times sent
+  dueDate       DateTime
+  status        InvoiceStatus
+  currency      Currency
+  quantityType  QuantityType
+  subTotal      Float
+  createDate    DateTime
+  month         Month
+  discount      Float?
+  taxes         Float?
+  totalAmount   Float
+  invoiceNumber String         @unique
+  pdfRef        String?
 
-  invoiceFromId String @map("tenant_id")
-  invoiceFrom   Tenant @relation(fields: [invoiceFromId], references: [id], onDelete: Cascade)
+  invoiceFromId String
+  invoiceFrom   Customer       @relation("InvoiceFrom", fields: [invoiceFromId], references: [id], onDelete: Cascade)
 
-  invoiceToId String @map("client_id")
-  invoiceTo   Client @relation("InvoiceTo", fields: [invoiceToId], references: [id], onDelete: Cascade)
+  invoiceToId   String
+  invoiceTo     Customer       @relation("InvoiceTo", fields: [invoiceToId], references: [id], onDelete: Cascade)
 
-  items LineItem[]
-
-  // Performance indexes for common queries
-  @@index([status]) // Status-based queries
-  @@index([invoiceFromId]) // Tenant-based queries
-  @@index([invoiceToId]) // Client-based queries
-  @@index([issueDate]) // Date-based queries
-  @@index([dueDate]) // Due date queries
-  @@index([status, invoiceFromId]) // Combined status + tenant
-  @@index([status, dueDate]) // Overdue invoice queries
+  items         InvoiceItem[]
 }
 
-model LineItem {
-  id          String  @id @default(uuid())
+model InvoiceItem {
+  id          String   @id @default(uuid())
   title       String
-  price       Float   @map("unit_pricr")
+  price       Float
   total       Float
   quantity    Int
   description String?
-  serviceId   String  @map("service_id")
-  service     Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
-  invoiceId   String  @map("invoice_id")
-  invoice     Invoice @relation(fields: [invoiceId], references: [id], onDelete: Cascade)
+  serviceId   String
+  service     Service   @relation(fields: [serviceId], references: [id], onDelete: Cascade)
+  invoiceId   String
+  invoice     Invoice   @relation(fields: [invoiceId], references: [id], onDelete: Cascade)
 }
 
-model Employee {
-  id        String         @id @default(uuid())
-  name      String         @map("employee_name")
-  email     String         @unique @map("employee_email")
-  status    EmployeeStatus @default(active) @map("employee_status")
-  iban      String?        @map("employee_iban")
-  cv        String?        @map("employee_cv_ref")
-  photo     String?        @map("employee_photo_ref")
-  project   String?        @map("employee_project")
-  tenantId  String         @map("tenant_id")
-  tenant    Tenant         @relation(fields: [tenantId], references: [id], onDelete: Cascade)
-  createdAt DateTime       @default(now()) @map("created_at")
-  updatedAt DateTime       @updatedAt @map("updated_at")
-}
-
-model User {
-  id          String   @id @default(uuid())
-  uid         String   @unique // Firebase UID
-  email       String   @unique
-  displayName String   @map("display_name")
-  role        UserRole
-  tenantId    String   @map("tenant_id")
-  tenant      Tenant   @relation(fields: [tenantId], references: [id], onDelete: Cascade)
-  createdAt   DateTime @default(now()) @map("created_at")
-  updatedAt   DateTime @updatedAt @map("updated_at")
-}
-
-enum UserRole {
-  ADMIN   @map("ADMIN")
-  MANAGER @map("MANAGER")
-  USER    @map("USER")
-}
-
-enum ClientStatus {
-  active   @map("ACTIVE")
-  banned   @map("BANNED")
-  inactive @map("INACTIVE")
+// Enums
+enum CustomerStatus {
+  active
+  banned
+  inactive
 }
 
 enum InvoiceStatus {
-  draft      @map("DRAFT")
-  processing @map("PROCESSING")
-  pending    @map("PENDING")
-  overdue    @map("OVERDUE")
-  paid       @map("PAID")
+  DRAFT
+  PROCESSING
+  PENDING
+  OVERDUE
+  PAID
 }
 
 enum Currency {
-  EUR @map("EUR")
-  USD @map("USD")
+  EUR
+  USD
 }
 
 enum QuantityType {
-  Unit   @map("UNIT")
-  Hour   @map("HOUR")
-  Sprint @map("SPRINT")
-  Month  @map("MONTH")
+  UNIT
+  HOUR
+  SPRINT
+  MONTH
 }
 
 enum Month {
-  January   @map("JANUARY")
-  February  @map("FEBRUARY")
-  March     @map("MARCH")
-  April     @map("APRIL")
-  May       @map("MAY")
-  June      @map("JUNE")
-  July      @map("JULY")
-  August    @map("AUGUST")
-  September @map("SEPTEMBER")
-  October   @map("OCTOBER")
-  November  @map("NOVEMBER")
-  December  @map("DECEMBER")
+  JANUARY
+  FEBRUARY
+  MARCH
+  APRIL
+  MAY
+  JUNE
+  JULY
+  AUGUST
+  SEPTEMBER
+  OCTOBER
+  NOVEMBER
+  DECEMBER
 }
-
-enum EmployeeStatus {
-  active   @map("ACTIVE")
-  inactive @map("INACTIVE")
-}
Index: prisma/seed.js
===================================================================
--- prisma/seed.js	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ prisma/seed.js	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -4,94 +4,123 @@
 
 async function main() {
-  // Clear existing data
-  await prisma.service.deleteMany();
-  await prisma.user.deleteMany();
-  await prisma.tenant.deleteMany();
+  console.log('🌱 Seeding database...');
 
-  // Define default tenant data
-  const tenantData = {
-    id: "cm7lxc3p00000pb7kmdrxsfod",
-    name: "MVP Masters",
-    email: "info@mvpmasters.com",
-    address: {
-      street: "Makedonska Treta Brigada 56",
-      city: "Skopje",
-      state: "Macedonia",
-      zip: "1000",
-      country: "Macedonia"
+  // Create Customers
+  const customer1 = await prisma.customer.create({
+    data: {
+      name: 'Acme Corp',
+      email: 'contact@acme.com',
+      street: '123 Main St',
+      city: 'New York',
+      country: 'USA',
+      state: 'NY',
+      zip: '10001',
+      phoneNumber: '+1 555-555-5555',
+      vatNumber: 'US123456789',
+      companyNumber: '123456789',
+      representative: 'John Doe',
+      status: 'ACTIVE',
+      logoUrl: 'https://example.com/logo.png',
     },
-    phoneNumber: "+389 72 233 943",
-    representative: "Naum Shapkarovski",
-    lastInvoiceNumber: "1",
-    logoUrl: "https://example.com/default-logo.png",
-    vatNumber: "VAT123456789",
-    companyNumber: "COMP123456",
-    bankAccounts: {
-      eur: {
-        accountNumber: "1234567890",
-        routingNumber: "987654321",
-        bicSwift: "DEFBANKXXX",
-        iban: "DE89370400440532013000"
-      },
-      usd: {
-        accountNumber: "0987654321",
-        routingNumber: "123456789",
-        bicSwift: "DEFBANKXXX",
-        iban: "US89370400440532013000"
-      }
-    },
-    // Add services along with the tenant creation
-    services: {
-      create: [
-        {
-          name: "Web Development",
-          sprint: 5000,
-          hour: 150,
-          month: 8000
-        },
-        {
-          name: "UI/UX Design",
-          sprint: 3000,
-          hour: 120,
-          month: 6000
-        },
-        {
-          name: "Consulting",
-          sprint: 4000,
-          hour: 200,
-          month: 7000
-        }
-      ]
-    }
-  };
-
-  // Create default tenant with services
-  const defaultTenant = await prisma.tenant.create({
-    data: tenantData,
-    include: {
-      services: true
-    }
   });
 
-  // Add default admin user
-  const defaultUser = await prisma.user.create({
+  const customer2 = await prisma.customer.create({
     data: {
-      id: 'dK2y3WezYWWltHCaBRvUFlddkOr2',
-      uid: 'dK2y3WezYWWltHCaBRvUFlddkOr2',
-      email: 'naum@mvpmasters.com',
-      displayName: 'Naum',
-      role: 'ADMIN',
-      tenantId: 'cm7lxc3p00000pb7kmdrxsfod'
-    }
+      name: 'Globex Ltd.',
+      email: 'info@globex.com',
+      street: '456 Industrial Rd',
+      city: 'Los Angeles',
+      country: 'USA',
+      state: 'CA',
+      zip: '90001',
+      phoneNumber: '+1 555-123-4567',
+      vatNumber: 'US987654321',
+      companyNumber: '987654321',
+      representative: 'Jane Smith',
+      status: 'INACTIVE',
+      logoUrl: 'https://example.com/logo2.png',
+    },
   });
 
-  console.log('🌱 Seeding database...');
-  console.log('Seeded default tenant:', defaultTenant);
-  console.log('Seeded default user:', defaultUser);
+  // Create Bank Accounts
+  await prisma.bankAccount.createMany({
+    data: [
+      {
+        customerId: customer1.id,
+        accountNumber: '1234567890',
+        bicSwift: 'ACMEUS33',
+        iban: 'US12345678901234567890',
+        routingNumber: '111000025',
+        currency: 'USD',
+      },
+      {
+        customerId: customer2.id,
+        accountNumber: '0987654321',
+        bicSwift: 'GLOBEXUS12',
+        iban: 'US09876543210987654321',
+        routingNumber: '222000033',
+        currency: 'EUR',
+      },
+    ],
+  });
+
+  // Create Services
+  const service1 = await prisma.service.create({
+    data: {
+      name: 'Web Development',
+      sprintPrice: 5000.0,
+      hourPrice: 100.0,
+      monthPrice: 20000.0,
+    },
+  });
+
+  const service2 = await prisma.service.create({
+    data: {
+      name: 'SEO Optimization',
+      sprintPrice: 3000.0,
+      hourPrice: 75.0,
+      monthPrice: 12000.0,
+    },
+  });
+
+  // Create Invoices
+  const invoice1 = await prisma.invoice.create({
+    data: {
+      dueDate: new Date('2025-03-15'),
+      status: 'PENDING',
+      currency: 'USD',
+      quantityType: 'HOUR',
+      subTotal: 5000.0,
+      createDate: new Date(),
+      month: 'FEBRUARY',
+      discount: 0.0,
+      taxes: 500.0,
+      totalAmount: 5500.0,
+      invoiceNumber: 'INV-2025-001',
+      pdfRef: 'https://example.com/invoice1.pdf',
+      invoiceFromId: customer1.id,
+      invoiceToId: customer2.id,
+    },
+  });
+
+  // Create Invoice Items
+  await prisma.invoiceItem.create({
+    data: {
+      title: 'Web Development - Sprint 1',
+      price: 5000.0,
+      total: 5000.0,
+      quantity: 1,
+      description: 'Development of the MVP frontend',
+      serviceId: service1.id,
+      invoiceId: invoice1.id,
+    },
+  });
+
+  console.log('✅ Seeding complete!');
 }
 
 main()
   .catch((e) => {
-    console.error('Error seeding database:', e);
+    console.error(e);
     process.exit(1);
   })
