CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Legal

⚖️ Legal · Database ERD

Legal Matter and Billing Schema

A schema for law firm matters and billing: clients, matters, timekeepers, time entries, expenses, invoices and trust accounts.

More Legal templates

Drawing diagram…

What this diagram shows

  • Every time entry and expense belongs to a matter
  • Billing rates depend on the timekeeper and the matter
  • Client trust (advance) money is tracked separately

Prompt used

ERD for legal billing: Client has Matters; Timekeeper (lawyer, paralegal) has a default rate; MatterRate can override rates per matter; TimeEntry records hours and narrative by a Timekeeper on a Matter; Expense records costs; Invoice groups unbilled entries for a Matter; TrustAccount holds client advances with TrustTransactions applied to invoices.

Mermaid code
erDiagram
  CLIENT ||--o{ MATTER : engages
  MATTER ||--o{ TIME_ENTRY : logs
  TIMEKEEPER ||--o{ TIME_ENTRY : records
  MATTER ||--o{ MATTER_RATE : sets
  TIMEKEEPER ||--o{ MATTER_RATE : "billed at"
  MATTER ||--o{ EXPENSE : incurs
  MATTER ||--o{ INVOICE : bills
  CLIENT ||--o| TRUST_ACCOUNT : holds
  TRUST_ACCOUNT ||--o{ TRUST_TRANSACTION : records
  MATTER {
    int id PK
    int client_id FK
    string matter_no
    string practice_area
  }
  TIME_ENTRY {
    int id PK
    int matter_id FK
    int timekeeper_id FK
    decimal hours
    string narrative
    bool billed
  }
  INVOICE {
    int id PK
    int matter_id FK
    decimal amount
    string status
  }

Related templates

State MachineLegal

Contract Lifecycle (CLM)

The states of a commercial contract in a contract lifecycle management system, from request and drafting to renewal or expiry.

SequenceLegal

E-Signature Flow

How a document gets signed electronically by several parties in order, with identity checks and a tamper-evident audit trail.

C4 ArchitectureProLegal

Legal Case Management Architecture

A law firm's case management platform: matters, documents, court dates, time tracking and billing, with a client portal.

FlowchartLegal

Legal Document Review and Approval

How a contract or legal document is reviewed inside a company: intake, playbook check, risk rating, approvals and signature.

Data FlowLegal

E-Discovery Data Pipeline

How electronic evidence is collected and reviewed in litigation: legal hold, collection, processing, review and production to the other side.

State MachineLegal

Litigation Case Lifecycle

The stages of a civil court case from filing to judgment and appeal, including settlement at any point.