﻿# `vendor_payments`

**Module:** Vendor (Legacy)

---

## Purpose

Legacy vendor payment milestones table. NOTE: This module has been superseded by the budget_expenses/budget_payments system. May be deprecated in a future version.

---

## Columns (Summary)

| Column | Notes |
|--------|-------|
| `id BIGINT UNSIGNED AUTO_INCREMENT PK` | — |
| `vendor_id BIGINT UNSIGNED NOT NULL FK→vendors` | — |
| `workspace_id BIGINT UNSIGNED NOT NULL (denormalized)` | — |
| `milestone_name VARCHAR(100) NOT NULL` | — |
| `amount DECIMAL(15,2) DEFAULT 0.00` | — |
| `due_date DATE NULL` | — |
| `paid_date DATE NULL` | — |
| `payment_method VARCHAR(50) NULL` | — |
| `notes VARCHAR(500) NULL` | — |
| `is_paid TINYINT(1) DEFAULT 0` | — |
| `is_deleted TINYINT(1) DEFAULT 0` | — |
| `created_at DATETIME DEFAULT CURRENT_TIMESTAMP` | — |
| `updated_at DATETIME NULL` | — |

---

## Referenced By

None

---

## Notes

See `docs/database/RELATIONSHIP.md` for full entity relationships and `database/schema.sql` for authoritative DDL.
