<?php

return <<<'SQL'
CREATE TABLE coffee_entries (
    id CHAR(36) NOT NULL PRIMARY KEY,
    tenant_id CHAR(36) NOT NULL,
    member_id CHAR(36) NOT NULL,
    strokes INT NOT NULL,
    unit_price DECIMAL(10,2) NOT NULL,
    total_cost DECIMAL(10,2) NOT NULL,
    booking_source VARCHAR(50) NOT NULL DEFAULT 'manual',
    booked_at DATETIME NOT NULL,
    created_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    FOREIGN KEY (tenant_id) REFERENCES tenants(id),
    FOREIGN KEY (member_id) REFERENCES members(id)
);
SQL;
